1
0
Fork 0
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:
nobu 2013-10-09 08:43:12 +00:00
parent 289d6bb30f
commit 9ef55da910
17 changed files with 68 additions and 95 deletions

View file

@ -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