lib/cukeforker/runner.rb in cukeforker-0.1.0 vs lib/cukeforker/runner.rb in cukeforker-0.1.1
- old
+ new
@@ -7,10 +7,12 @@
# and 'opts' is a Hash of options:
#
# :max => Fixnum number of workers (default: 2)
# :vnc => true/false children are launched with DISPLAY set from a VNC server pool,
# where the size of the pool is equal to :max
+ # :record => true/false whether to record a video of failed tests (requires ffmpeg)
+ # this will be ignored if if :vnc is not true
# :notify => object (or array of objects) implementing the AbstractListener API
# :out => path directory to dump output to (default: current working dir)
# :log => true/false wether or not to log to stdout (default: true)
# :format => Symbol format passed to `cucumber --format` (default: html)
# :extra_args => Array extra arguments passed to cucumber
@@ -45,10 +47,14 @@
listeners << LoggingListener.new
end
if opts[:vnc]
vnc_pool = VncTools::ServerPool.new(max)
- listeners << VncListener.new(vnc_pool)
+ listener = VncListener.new(vnc_pool)
+
+ if opts[:record]
+ listeners << RecordingVncListener.new(listener)
+ end
end
queue = WorkerQueue.new max
features.each do |feature|
queue.add Worker.new(feature, format, out, extra_args)