Sha256: 0a5543c6874ceb934bb1e859b67c0f77316856ec8f38418c4a5e613e3c7a2357
Contents?: true
Size: 732 Bytes
Versions: 2
Compression:
Stored size: 732 Bytes
Contents
class Test::Unit::TestCase def default_runtime_options options = OpenStruct.new options.root = File.expand_path("../../dummy", __FILE__) options.features = File.join(options.root, "features") options.verbose = false options end def current_runtime_options @current_runtime_options ||= default_runtime_options end def within_loop(opts={}, &block) output = capture_stdout do EM.run { options = default_runtime_options opts.map{ |k,v| options.send("#{k}=", v) } @current_runtime_options = options Autocuke.start(options) yield EM.stop } end outputs = output.string.split("\n").select{|i| i && 0 < i.length } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
autocuke-0.1.1 | test/support/em.rb |
autocuke-0.1.0 | test/support/em.rb |