Skip to content

Commit 7d8e5fa

Browse files
committed
Avoid dependency on MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS.
1 parent b057fab commit 7d8e5fa

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

activesupport/lib/active_support/testing/setup_and_teardown.rb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
module ActiveSupport
55
module Testing
66
module SetupAndTeardown
7+
8+
PASSTHROUGH_EXCEPTIONS = [
9+
NoMemoryError,
10+
SignalException,
11+
Interrupt,
12+
SystemExit
13+
]
14+
715
extend ActiveSupport::Concern
816

917
included do
@@ -28,14 +36,14 @@ def run(runner)
2836
run_callbacks :setup do
2937
result = super
3038
end
31-
rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
39+
rescue *PASSTHROUGH_EXCEPTIONS
3240
raise
3341
rescue Exception => e
3442
result = runner.puke(self.class, method_name, e)
3543
ensure
3644
begin
3745
run_callbacks :teardown
38-
rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
46+
rescue *PASSTHROUGH_EXCEPTIONS
3947
raise
4048
rescue Exception => e
4149
result = runner.puke(self.class, method_name, e)

0 commit comments

Comments
 (0)