diff options
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/test/unit/assertions.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/lib/test/unit/assertions.rb b/test/lib/test/unit/assertions.rb index d23cd7220b..fda2299eb0 100644 --- a/test/lib/test/unit/assertions.rb +++ b/test/lib/test/unit/assertions.rb @@ -89,11 +89,13 @@ module Test } return e - end - - exp = exp.first if exp.size == 1 + ensure + unless e + exp = exp.first if exp.size == 1 - flunk(message(msg) {"#{mu_pp(exp)} expected but nothing was raised"}) + flunk(message(msg) {"#{mu_pp(exp)} expected but nothing was raised"}) + end + end end def assert_raises(*exp, &b) |