We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8ed051 commit a261478Copy full SHA for a261478
shared/kernel/raise.rb
@@ -88,6 +88,10 @@ def initialize
88
-> { @object.raise(nil) }.should raise_error(TypeError, "exception class/object expected")
89
end
90
91
+ it "raises a TypeError when passed a message and an extra argument" do
92
+ -> { @object.raise("message", {cause: RuntimeError.new()}) }.should raise_error(TypeError, "exception class/object expected")
93
+ end
94
+
95
it "raises TypeError when passed a non-Exception object but it responds to #exception method that doesn't return an instance of Exception class" do
96
e = Object.new
97
def e.exception
0 commit comments