diff options
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/test_case.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb index be38eb64a1..b991f62a17 100644 --- a/activesupport/lib/active_support/test_case.rb +++ b/activesupport/lib/active_support/test_case.rb @@ -4,15 +4,16 @@ require 'active_support/testing/declarative' module ActiveSupport # Prefer MiniTest with Test::Unit compatibility. - # Hacks around the test/unit autorun. begin require 'minitest/unit' + + # Hack around the test/unit autorun. + autorun_enabled = MiniTest::Unit.class_variable_get('@@installed_at_exit') MiniTest::Unit.disable_autorun require 'test/unit' + MiniTest::Unit.class_variable_set('@@installed_at_exit', autorun_enabled) - class TestCase < ::Test::Unit::TestCase - @@installed_at_exit = false - end + class TestCase < ::Test::Unit::TestCase; end # Test::Unit compatibility. rescue LoadError |