Permalink
Browse files

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

…subclass StandardError
  • Loading branch information...
1 parent 8bfd5ed commit d87d3f76d547df7c956fe4fab324cad9396477ae @jeremy jeremy committed Nov 9, 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 < ActionController::TestCase
def test_should_reraise_the_same_object
exception = ActiveSupport::TestCase::Assertion.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 = ActiveSupport::TestCase::Assertion.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 d87d3f7

Please sign in to comment.