Skip to content

Commit 20b5c9b

Browse files
herwinweregon
authored andcommitted
Fix names of error in test descriptions of Kernel#raise
This was probably a leftover of a copy-paste, these should check TypeError instead of ArgumentError.
1 parent d01bf69 commit 20b5c9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/kernel/raise_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@
5151
-> { raise(cause: nil) }.should raise_error(ArgumentError, "only cause is given with no arguments")
5252
end
5353

54-
it "raises an ArgumentError when given cause is not an instance of Exception" do
54+
it "raises a TypeError when given cause is not an instance of Exception" do
5555
-> { raise "message", cause: Object.new }.should raise_error(TypeError, "exception object expected")
5656
end
5757

58-
it "doesn't raise an ArgumentError when given cause is nil" do
58+
it "doesn't raise a TypeError when given cause is nil" do
5959
-> { raise "message", cause: nil }.should raise_error(RuntimeError, "message")
6060
end
6161

0 commit comments

Comments
 (0)