зеркало из https://github.com/github/ruby.git
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
This commit is contained in:
Родитель
425dc308d7
Коммит
545165770b
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче