diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-05-25 22:37:10 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-05-25 22:37:10 +0900 |
| commit | 77942f70a53fc0165c8b83368010d26cf8321b68 (patch) | |
| tree | 6eab09b4132d3b9c418081bd55663b6a76826ae9 | |
| parent | 7c30097183a825a74cc2963a7ba5d987da4d7463 (diff) | |
| parent | bc0cf69a839d4732585e406ea6faa97d3d52986c (diff) | |
| download | mruby-77942f70a53fc0165c8b83368010d26cf8321b68.tar.gz mruby-77942f70a53fc0165c8b83368010d26cf8321b68.zip | |
Merge pull request #2316 from ksss/test-exception
Exception#exception fix test
| -rw-r--r-- | test/t/exception.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/test/t/exception.rb b/test/t/exception.rb index 8aa07e813..be487162f 100644 --- a/test/t/exception.rb +++ b/test/t/exception.rb @@ -16,11 +16,14 @@ assert('Exception.exception', '15.2.22.4.1') do end assert('Exception#exception', '15.2.22.5.1') do - e1 = Exception.exception() - e2 = Exception.exception('b') - - assert_equal Exception, e1.class - assert_equal Exception, e2.class + e = Exception.new + re = RuntimeError.new + assert_equal e, e.exception + assert_equal e, e.exception(e) + assert_equal re, re.exception(re) + changed_re = re.exception('message has changed') + assert_not_equal re, changed_re + assert_equal 'message has changed', changed_re.message end assert('Exception#message', '15.2.22.5.2') do |
