Commit c302b86f authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2220 from yui-knk/refactor-test

Refactoring test to use assert_nothing_raised.
parents 48ac1f74 faee6987
......@@ -345,13 +345,13 @@ assert('Exception#inspect without message') do
end
assert('Exception#backtrace') do
begin
raise "get backtrace"
rescue => e
e.backtrace
assert_nothing_raised do
begin
raise "get backtrace"
rescue => e
e.backtrace
end
end
true
end
assert('Raise in ensure') do
......
......@@ -476,7 +476,11 @@ assert('String#upcase!', '15.2.10.5.43') do
end
assert('String#inspect', '15.2.10.5.46') do
("\1" * 100).inspect # should not raise an exception - regress #1210
# should not raise an exception - regress #1210
assert_nothing_raised do
("\1" * 100).inspect
end
assert_equal "\"\\000\"", "\0".inspect
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment