Skip to content

Commit

Permalink
Process review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
herwinw committed Sep 26, 2023
1 parent 2a1aacd commit 968d483
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions core/signal/signame_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
-> { Signal.signame("hello") }.should raise_error(TypeError)
end

it "raises a TypeError when the passed argument responds to #to_int but does not return an Integer" do
obj = mock('signal')
obj.should_receive(:to_int).and_return('not an int')
-> { Signal.signame(obj) }.should raise_error(TypeError)
end

platform_is_not :windows do
it "the original should take precedence over alias when looked up by number" do
Signal.signame(Signal.list["ABRT"]).should == "ABRT"
Expand Down
2 changes: 1 addition & 1 deletion core/signal/trap_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
Signal.trap(hup, @saved_trap).should equal(@proc)
end

it "doest not call #to_int on an object to convert to an Integer" do
it "does not call #to_int on an object to convert to an Integer" do
obj = mock("signal")
obj.should_not_receive(:to_int)
-> { Signal.trap obj, @proc }.should raise_error(ArgumentError, /bad signal type/)
Expand Down

0 comments on commit 968d483

Please sign in to comment.