From 7d8e5fac758bebc7199b514b08d4755a6f897435 Mon Sep 17 00:00:00 2001 From: James Mead Date: Tue, 29 May 2012 09:28:22 +0100 Subject: Avoid dependency on MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS. --- .../lib/active_support/testing/setup_and_teardown.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support') 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) -- cgit v1.2.3