lib/cukeforker/runner.rb in cukeforker-0.2.1 vs lib/cukeforker/runner.rb in cukeforker-0.2.2
- old
+ new
@@ -23,18 +23,19 @@
class Runner
include Observable
DEFAULT_OPTIONS = {
- :max => 2,
- :vnc => false,
- :record => false,
- :notify => nil,
- :out => Dir.pwd,
- :log => true,
- :format => :html,
- :delay => 0
+ :max => 2,
+ :vnc => false,
+ :record => false,
+ :notify => nil,
+ :out => Dir.pwd,
+ :log => true,
+ :format => :html,
+ :delay => 0,
+ :fail_fast => false,
}
def self.run(features, opts = {})
create(features, opts).run
end
@@ -46,10 +47,11 @@
format = opts[:format]
out = File.join opts[:out]
listeners = Array(opts[:notify])
extra_args = Array(opts[:extra_args])
delay = opts[:delay]
+ fail_fast = opts[:fail_fast]
if opts[:log]
listeners << LoggingListener.new
end
@@ -71,10 +73,10 @@
else
listeners << listener
end
end
- queue = WorkerQueue.new max, delay
+ queue = WorkerQueue.new(max, delay, fail_fast)
features.each do |feature|
queue.add Worker.new(feature, format, out, extra_args)
end
runner = Runner.new queue