1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/fileutils] 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>.
```

https://github.com/ruby/fileutils/commit/2f38ba6e82
This commit is contained in:
David Rodríguez 2019-11-30 14:01:18 +01:00 committed by Hiroshi SHIBATA
parent 5b1f7f26b4
commit fa0f3eff22

View file

@ -216,7 +216,7 @@ eom
}
assert expected, proc {
exception_details(e, message(msg) {"#{mu_pp(exp)} exception expected, not"}.call)
flunk(message(msg) {"#{mu_pp(exp)} exception expected, not #{mu_pp(e)}"})
}
return e