spec/cukeforker/runner_spec.rb in cukeforker-0.2.0 vs spec/cukeforker/runner_spec.rb in cukeforker-0.2.1
- old
+ new
@@ -11,17 +11,18 @@
format = :json
out = "/tmp"
listeners = [double(AbstractListener, :update => nil)]
log = false
features = %w[a b]
+ delay = 1
mock_queue = double(WorkerQueue)
mock_workers = Array.new(2) { |n| double("Worker-#{n}") }
Process.stub(:pid => 1234)
- WorkerQueue.should_receive(:new).with(max).and_return mock_queue
+ WorkerQueue.should_receive(:new).with(max, 1).and_return mock_queue
Worker.should_receive(:new).with("a", :json, "/tmp", []).and_return mock_workers[0]
Worker.should_receive(:new).with("b", :json, "/tmp", []).and_return mock_workers[1]
mock_queue.should_receive(:add_observer).once.with listeners.first
mock_queue.should_receive(:add).with mock_workers[0]
@@ -30,10 +31,11 @@
Runner.create(features,
:max => max,
:notify => listeners,
:format => format,
:log => false,
- :out => out
+ :out => out,
+ :delay => 1
).should be_kind_of(Runner)
end
it "sets up the VNC pool if :vnc => true" do
mock_pool = double(VncTools::ServerPool, :add_observer => nil)