spec/cukeforker/worker_spec.rb in cukeforker-0.2.3 vs spec/cukeforker/worker_spec.rb in cukeforker-0.2.4

- old
+ new

@@ -58,10 +58,12 @@ worker.text.should include("some/feature") end it "runs a passing cuke and exits with 0" do Process.should_receive(:fork).and_yield.and_return(1234) + Process.should_receive(:setpgid).with(0,0) + $stdout.should_receive(:reopen).with("some/path/some_feature.stdout") $stderr.should_receive(:reopen).with("some/path/some_feature.stderr") Cucumber::Cli::Main.should_receive(:execute).and_return(false) worker.should_receive(:exit).with(0) @@ -69,9 +71,11 @@ worker.start end it "runs a failing cuke and exits with 1" do Process.should_receive(:fork).and_yield.and_return(1234) + Process.should_receive(:setpgid).with(0,0) + $stdout.should_receive(:reopen).with("some/path/some_feature.stdout") $stderr.should_receive(:reopen).with("some/path/some_feature.stderr") Cucumber::Cli::Main.should_receive(:execute).and_return(true) worker.should_receive(:exit).with(1)