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.
Test::Unit::CoreAssertions#assert_raise_with_message
1 parent 87426f5 commit ae94fcaCopy full SHA for ae94fca
tool/test/testunit/test_assertion.rb
@@ -27,6 +27,26 @@ def test_assert_raise
27
end
28
29
30
+ def test_assert_raise_with_message
31
+ my_error = Class.new(StandardError)
32
+
33
+ assert_raise_with_message(my_error, "with message") do
34
+ raise my_error, "with message"
35
+ end
36
37
+ assert_raise(Test::Unit::AssertionFailedError) do
38
+ assert_raise_with_message(RuntimeError, "with message") do
39
40
41
42
43
44
+ assert_raise_with_message(my_error, "without message") do
45
46
47
48
49
50
def test_assert_pattern_list
51
assert_pattern_list([/foo?/], "foo")
52
assert_not_pattern_list([/foo?/], "afoo")
0 commit comments