mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05: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
|
|
@ -49,8 +49,7 @@ class TestISeq < Test::Unit::TestCase
|
|||
def test_unsupport_type
|
||||
ary = RubyVM::InstructionSequence.compile("p").to_a
|
||||
ary[9] = :foobar
|
||||
e = assert_raise(TypeError) {RubyVM::InstructionSequence.load(ary)}
|
||||
assert_match(/:foobar/, e.message)
|
||||
assert_raise_with_message(TypeError, /:foobar/) {RubyVM::InstructionSequence.load(ary)}
|
||||
end if defined?(RubyVM::InstructionSequence.load)
|
||||
|
||||
def test_disasm_encoding
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue