Skip to content

Commit 2f38ba6

Browse files
Fix error printing test failure
`exception_details` is not defined anywhere. This commit fixes the following test crash in ruby 2.4 ``` Error: test_assert_output_lines(TestFileUtils): NoMethodError: undefined method `exception_details' for #<TestFileUtils:0x00005556ef699178> ``` And replaces it with an actual test failure: ``` [Test::Unit::CoreAssertions::MiniTest::Assertion] exception expected, not #<NoMethodError: undefined method `full_message' for #<RuntimeError: ok> Did you mean? message>. ```
1 parent da15e3c commit 2f38ba6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/lib/core_assertions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def assert_raise(*exp, &b)
213213
}
214214

215215
assert expected, proc {
216-
exception_details(e, message(msg) {"#{mu_pp(exp)} exception expected, not"}.call)
216+
flunk(message(msg) {"#{mu_pp(exp)} exception expected, not #{mu_pp(e)}"})
217217
}
218218

219219
return e

0 commit comments

Comments
 (0)