Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/kernel/raise_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@
-> { raise(cause: nil) }.should raise_error(ArgumentError, "only cause is given with no arguments")
end

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

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

Expand Down