mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 21:44:30 +02:00
test/unit/assertions.rb: return exception
* lib/test/unit/assertions.rb (assert_raise_with_message): return raised exception same as assert_raise. * test/ruby, test/-ext-: use assert_raise_with_message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
289d6bb30f
commit
9ef55da910
17 changed files with 68 additions and 95 deletions
|
@ -946,8 +946,9 @@ class TestRegexp < Test::Unit::TestCase
|
|||
def test_error_message_on_failed_conversion
|
||||
bug7539 = '[ruby-core:50733]'
|
||||
assert_equal false, /x/=== 42
|
||||
err = assert_raise(TypeError){ Regexp.quote(42) }
|
||||
assert_equal 'no implicit conversion of Fixnum into String', err.message, bug7539
|
||||
assert_raise_with_message(TypeError, 'no implicit conversion of Fixnum into String', bug7539) {
|
||||
Regexp.quote(42)
|
||||
}
|
||||
end
|
||||
|
||||
def test_conditional_expression
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue