diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_econv.rb | 2 | ||||
-rw-r--r-- | test/ruby/test_transcode.rb | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb index 025887f1c6..5ba6b7c447 100644 --- a/test/ruby/test_econv.rb +++ b/test/ruby/test_econv.rb @@ -37,7 +37,7 @@ class TestEncodingConverter < Test::Unit::TestCase name1 = "encoding-which-is-not-exist-1" name2 = "encoding-which-is-not-exist-2" - assert_raise(ArgumentError) { + assert_raise(Encoding::NoConverter) { Encoding::Converter.new(name1, name2) } diff --git a/test/ruby/test_transcode.rb b/test/ruby/test_transcode.rb index b88b4d561d..fd673a96c0 100644 --- a/test/ruby/test_transcode.rb +++ b/test/ruby/test_transcode.rb @@ -21,10 +21,10 @@ class TestTranscode < Test::Unit::TestCase def test_errors assert_raise(ArgumentError) { 'abc'.encode } assert_raise(ArgumentError) { 'abc'.encode! } - assert_raise(ArgumentError) { 'abc'.encode('foo', 'bar') } - assert_raise(ArgumentError) { 'abc'.encode!('foo', 'bar') } - assert_raise(ArgumentError) { 'abc'.force_encoding('utf-8').encode('foo') } - assert_raise(ArgumentError) { 'abc'.force_encoding('utf-8').encode!('foo') } + assert_raise(Encoding::NoConverter) { 'abc'.encode('foo', 'bar') } + assert_raise(Encoding::NoConverter) { 'abc'.encode!('foo', 'bar') } + assert_raise(Encoding::NoConverter) { 'abc'.force_encoding('utf-8').encode('foo') } + assert_raise(Encoding::NoConverter) { 'abc'.force_encoding('utf-8').encode!('foo') } assert_raise(Encoding::ConversionUndefined) { "\x80".encode('utf-8','ASCII-8BIT') } assert_raise(Encoding::InvalidByteSequence) { "\x80".encode('utf-8','US-ASCII') } assert_raise(Encoding::ConversionUndefined) { "\xA5".encode('utf-8','iso-8859-3') } |