diff options
author | James Mead <james@floehopper.org> | 2012-05-29 09:28:22 +0100 |
---|---|---|
committer | James Mead <james@floehopper.org> | 2012-05-29 09:28:22 +0100 |
commit | 7d8e5fac758bebc7199b514b08d4755a6f897435 (patch) | |
tree | 87d7fb525e94c8fdf69524a1a2371f779fc20e81 /activesupport/lib/active_support | |
parent | b057fab6383e5dd9f376036ce10fa908c0e185cb (diff) | |
download | rails-7d8e5fac758bebc7199b514b08d4755a6f897435.tar.gz rails-7d8e5fac758bebc7199b514b08d4755a6f897435.tar.bz2 rails-7d8e5fac758bebc7199b514b08d4755a6f897435.zip |
Avoid dependency on MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS.
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/testing/setup_and_teardown.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/testing/setup_and_teardown.rb b/activesupport/lib/active_support/testing/setup_and_teardown.rb index c6ae6bafa5..527fa555b7 100644 --- a/activesupport/lib/active_support/testing/setup_and_teardown.rb +++ b/activesupport/lib/active_support/testing/setup_and_teardown.rb @@ -4,6 +4,14 @@ require 'active_support/callbacks' module ActiveSupport module Testing module SetupAndTeardown + + PASSTHROUGH_EXCEPTIONS = [ + NoMemoryError, + SignalException, + Interrupt, + SystemExit + ] + extend ActiveSupport::Concern included do @@ -28,14 +36,14 @@ module ActiveSupport run_callbacks :setup do result = super end - rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS + rescue *PASSTHROUGH_EXCEPTIONS raise rescue Exception => e result = runner.puke(self.class, method_name, e) ensure begin run_callbacks :teardown - rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS + rescue *PASSTHROUGH_EXCEPTIONS raise rescue Exception => e result = runner.puke(self.class, method_name, e) |