spec/cukeforker/worker_spec.rb in cukeforker-0.1.9 vs spec/cukeforker/worker_spec.rb in cukeforker-0.2.0

- old
+ new

@@ -66,11 +66,11 @@ worker.start end it "fires an event after forking" do - mock_listener = mock(AbstractListener) + mock_listener = double(AbstractListener) mock_listener.should_receive(:update).with(:on_worker_forked, worker) worker.add_observer mock_listener Process.should_receive(:fork).and_yield.and_return(1234) @@ -86,15 +86,15 @@ worker.stub :status => nil worker.should be_failed end it "considers itself failed if the exit code was 1" do - worker.stub :status => mock(:exitstatus => 1) + worker.stub :status => double(:exitstatus => 1) worker.should be_failed end it "considers itself failed if the exit code was 0" do - worker.stub :status => mock(:exitstatus => 0) + worker.stub :status => double(:exitstatus => 0) worker.should_not be_failed end it "knows if the child is still running" do Process.stub :waitpid2 => nil