diff options
-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) |