diff options
author | ntalbott <ntalbott@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-05 00:59:02 +0000 |
---|---|---|
committer | ntalbott <ntalbott@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-05 00:59:02 +0000 |
commit | a2108abc5b0f46650cc33e2e9574c3c7e5edb499 (patch) | |
tree | b3c7cbdee651561c4f9439798ea932b1ac0d9622 /test/testunit/test_assertions.rb | |
parent | 36df633da547e9c35f86c471e25f3625938a14ba (diff) | |
download | ruby-a2108abc5b0f46650cc33e2e9574c3c7e5edb499.tar.gz ruby-a2108abc5b0f46650cc33e2e9574c3c7e5edb499.tar.xz ruby-a2108abc5b0f46650cc33e2e9574c3c7e5edb499.zip |
* lib/test/unit/assertions.rb: will use pp for output if available.
Can be disabled by setting Assertions.use_pp = false.
* test/testunit/test_assertions.rb: made a small change to exception
formatting.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/testunit/test_assertions.rb')
-rw-r--r-- | test/testunit/test_assertions.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/testunit/test_assertions.rb b/test/testunit/test_assertions.rb index 8dd4f61a5..ab92bcfc6 100644 --- a/test/testunit/test_assertions.rb +++ b/test/testunit/test_assertions.rb @@ -133,7 +133,7 @@ module Test 1 + 1 } } - check_fails(%r{\Afailed assert_raises.\n<ArgumentError> exception expected but was\nClass: <RuntimeError>\nMessage: <Error>\n---Backtrace---\n.+\n---------------\Z}m) { + check_fails(%r{\Afailed assert_raises.\n<ArgumentError> exception expected but was\nClass: <RuntimeError>\nMessage: <"Error">\n---Backtrace---\n.+\n---------------\Z}m) { assert_raises(ArgumentError, "failed assert_raises") { raise "Error" } @@ -265,17 +265,17 @@ module Test rescue ZeroDivisionError end } - check_fails(%r{\AException raised:\nClass: <RuntimeError>\nMessage: <Error>\n---Backtrace---\n.+\n---------------\Z}m) { + check_fails(%r{\AException raised:\nClass: <RuntimeError>\nMessage: <"Error">\n---Backtrace---\n.+\n---------------\Z}m) { assert_nothing_raised { raise "Error" } } - check_fails(%r{\Afailed assert_nothing_raised\.\nException raised:\nClass: <RuntimeError>\nMessage: <Error>\n---Backtrace---\n.+\n---------------\Z}m) { + check_fails(%r{\Afailed assert_nothing_raised\.\nException raised:\nClass: <RuntimeError>\nMessage: <"Error">\n---Backtrace---\n.+\n---------------\Z}m) { assert_nothing_raised("failed assert_nothing_raised") { raise "Error" } } - check_fails(%r{\AException raised:\nClass: <RuntimeError>\nMessage: <Error>\n---Backtrace---\n.+\n---------------\Z}m) { + check_fails(%r{\AException raised:\nClass: <RuntimeError>\nMessage: <"Error">\n---Backtrace---\n.+\n---------------\Z}m) { assert_nothing_raised(StandardError, RuntimeError) { raise "Error" } |