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 529b1ea commit c08d7b3Copy full SHA for c08d7b3
spec/ruby/core/integer/try_convert_spec.rb
@@ -41,17 +41,6 @@
41
}.should raise_error(TypeError, "can't convert MockObject to Integer (MockObject#to_int gives String)")
42
end
43
44
- it "responds with a different error message when it raises a TypeError, depending on the type of the argument object :to_int was called on " do
45
- class DifferentMockObject
46
- def to_int
47
- Object.new
48
- end
49
50
- -> {
51
- Integer.try_convert DifferentMockObject.new
52
- }.should raise_error(TypeError, "can't convert DifferentMockObject to Integer (DifferentMockObject#to_int gives Object)")
53
54
-
55
it "does not rescue exceptions raised by #to_int" do
56
obj = mock("to_int")
57
obj.should_receive(:to_int).and_raise(RuntimeError)
0 commit comments