diff options
Diffstat (limited to 'spec/ruby/core/process/kill_spec.rb')
| -rw-r--r-- | spec/ruby/core/process/kill_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/core/process/kill_spec.rb b/spec/ruby/core/process/kill_spec.rb index 14deba2451..af9c9e6deb 100644 --- a/spec/ruby/core/process/kill_spec.rb +++ b/spec/ruby/core/process/kill_spec.rb @@ -9,25 +9,25 @@ describe "Process.kill" do end it "raises an ArgumentError for unknown signals" do - lambda { Process.kill("FOO", @pid) }.should raise_error(ArgumentError) + -> { Process.kill("FOO", @pid) }.should raise_error(ArgumentError) end it "raises an ArgumentError if passed a lowercase signal name" do - lambda { Process.kill("term", @pid) }.should raise_error(ArgumentError) + -> { Process.kill("term", @pid) }.should raise_error(ArgumentError) end - it "raises an ArgumentError if signal is not a Fixnum or String" do + it "raises an ArgumentError if signal is not an Integer or String" do signal = mock("process kill signal") signal.should_not_receive(:to_int) - lambda { Process.kill(signal, @pid) }.should raise_error(ArgumentError) + -> { Process.kill(signal, @pid) }.should raise_error(ArgumentError) end it "raises Errno::ESRCH if the process does not exist" do pid = Process.spawn(*ruby_exe, "-e", "sleep 10") Process.kill("SIGKILL", pid) Process.wait(pid) - lambda { + -> { Process.kill("SIGKILL", pid) }.should raise_error(Errno::ESRCH) end |
