diff options
Diffstat (limited to 'spec/ruby/shared/process/fork.rb')
| -rw-r--r-- | spec/ruby/shared/process/fork.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/ruby/shared/process/fork.rb b/spec/ruby/shared/process/fork.rb index c2c2aee9bf..8dbb3d0da4 100644 --- a/spec/ruby/shared/process/fork.rb +++ b/spec/ruby/shared/process/fork.rb @@ -8,7 +8,7 @@ describe :process_fork, shared: true do end it "raises a NotImplementedError when called" do - lambda { @object.fork }.should raise_error(NotImplementedError) + -> { @object.fork }.should raise_error(NotImplementedError) end end @@ -23,31 +23,31 @@ describe :process_fork, shared: true do end it "returns status zero" do - pid = Process.fork { exit! 0 } + pid = @object.fork { exit! 0 } _, result = Process.wait2(pid) result.exitstatus.should == 0 end it "returns status zero" do - pid = Process.fork { exit 0 } + pid = @object.fork { exit 0 } _, result = Process.wait2(pid) result.exitstatus.should == 0 end it "returns status zero" do - pid = Process.fork {} + pid = @object.fork {} _, result = Process.wait2(pid) result.exitstatus.should == 0 end it "returns status non-zero" do - pid = Process.fork { exit! 42 } + pid = @object.fork { exit! 42 } _, result = Process.wait2(pid) result.exitstatus.should == 42 end it "returns status non-zero" do - pid = Process.fork { exit 42 } + pid = @object.fork { exit 42 } _, result = Process.wait2(pid) result.exitstatus.should == 42 end @@ -60,7 +60,7 @@ describe :process_fork, shared: true do else Process.waitpid(child_id) end - File.exist?(@file).should == true + File.should.exist?(@file) end it "runs a block in a child process" do @@ -69,7 +69,7 @@ describe :process_fork, shared: true do Process.exit! } Process.waitpid(pid) - File.exist?(@file).should == true + File.should.exist?(@file) end it "marks threads from the parent as killed" do |
