Skip to content
Browse files

Ruby 1.9 compat: rescue Exception since minitest's assertion doesn't …

…subclass StandardError
  • Loading branch information...
1 parent b55fc0f commit fa7151cc0dd5f39ebcac4826d74ff640f41ced04 @jeremy jeremy committed Nov 8, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/test/controller/test_test.rb
View
4 actionpack/test/controller/test_test.rb
@@ -606,7 +606,7 @@ class CleanBacktraceTest < Test::Unit::TestCase
def test_should_reraise_the_same_object
exception = Test::Unit::AssertionFailedError.new('message')
clean_backtrace { raise exception }
- rescue => caught
+ rescue Exception => caught
assert_equal exception.object_id, caught.object_id
assert_equal exception.message, caught.message
end
@@ -616,7 +616,7 @@ def test_should_clean_assertion_lines_from_backtrace
exception = Test::Unit::AssertionFailedError.new('message')
exception.set_backtrace ["#{path}/abc", "#{path}/assertions/def"]
clean_backtrace { raise exception }
- rescue => caught
+ rescue Exception => caught
assert_equal ["#{path}/abc"], caught.backtrace
end

0 comments on commit fa7151c

Please sign in to comment.
Something went wrong with that request. Please try again.