summaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-26 18:25:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-26 18:25:13 +0000
commit545165770bd397e197da7df4e423f3a88d114a76 (patch)
treed2b6b5eecfa3289da9107f700c3025841159710d /test/lib
parent425dc308d7098fb891e0bed5fbcab58a875e3cf4 (diff)
assertions.rb: refine message
* test/lib/test/unit/assertions.rb (assert_raise_with_message): refine default message for the exception to be raised. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/test/unit/assertions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lib/test/unit/assertions.rb b/test/lib/test/unit/assertions.rb
index 869baf505f..435719a22e 100644
--- a/test/lib/test/unit/assertions.rb
+++ b/test/lib/test/unit/assertions.rb
@@ -126,7 +126,7 @@ module Test
raise TypeError, "Expected #{expected.inspect} to be a kind of String or Regexp, not #{expected.class}"
end
- ex = assert_raise(exception, *msg) {yield}
+ ex = assert_raise(exception, msg || proc {"Exception(#{exception}) with message matches to #{expected.inspect}"}) {yield}
msg = message(msg, "") {"Expected Exception(#{exception}) was raised, but the message doesn't match"}
if assert == :assert_equal