mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Fix compatibility with Ruby 1.8 that also has the Miniunit gem installed.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
committed by
Jeremy Kemper
parent
2ace3d9154
commit
3a33ee28e9
@@ -8,10 +8,14 @@ module ActiveSupport
|
||||
require 'minitest/unit'
|
||||
|
||||
# Hack around the test/unit autorun.
|
||||
autorun_enabled = MiniTest::Unit.class_variable_get('@@installed_at_exit')
|
||||
MiniTest::Unit.disable_autorun
|
||||
autorun_enabled = MiniTest::Unit.send(:class_variable_get, '@@installed_at_exit')
|
||||
if MiniTest::Unit.respond_to?(:disable_autorun)
|
||||
MiniTest::Unit.disable_autorun
|
||||
else
|
||||
MiniTest::Unit.send(:class_variable_set, '@@installed_at_exit', false)
|
||||
end
|
||||
require 'test/unit'
|
||||
MiniTest::Unit.class_variable_set('@@installed_at_exit', autorun_enabled)
|
||||
MiniTest::Unit.send(:class_variable_set, '@@installed_at_exit', autorun_enabled)
|
||||
|
||||
class TestCase < ::Test::Unit::TestCase
|
||||
Assertion = MiniTest::Assertion
|
||||
|
||||
Reference in New Issue
Block a user