diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-09 08:43:12 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-09 08:43:12 +0000 |
commit | 9ef55da91006a19dc4fb612c735b335175b3259b (patch) | |
tree | d1b5676b11b6cf64709f040c2c1b4aba60da02fe /test/ruby/test_io_m17n.rb | |
parent | 289d6bb30f4c2fffa2437436030c889f10522e72 (diff) | |
download | ruby-9ef55da91006a19dc4fb612c735b335175b3259b.tar.gz |
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
Diffstat (limited to 'test/ruby/test_io_m17n.rb')
-rw-r--r-- | test/ruby/test_io_m17n.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index dee36abaaf..45fa98e897 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -763,10 +763,12 @@ EOT assert_equal(eucjp, r.read) end) - e = assert_raise(ArgumentError) {with_pipe("UTF-8", "UTF-8".encode("UTF-32BE")) {}} - assert_match(/invalid name encoding/, e.message) - e = assert_raise(ArgumentError) {with_pipe("UTF-8".encode("UTF-32BE")) {}} - assert_match(/invalid name encoding/, e.message) + assert_raise_with_message(ArgumentError, /invalid name encoding/) do + with_pipe("UTF-8", "UTF-8".encode("UTF-32BE")) {} + end + assert_raise_with_message(ArgumentError, /invalid name encoding/) do + with_pipe("UTF-8".encode("UTF-32BE")) {} + end ENCS.each {|enc| pipe(enc, |