Skip to content
Browse files

Merge pull request #4320 from castlerock/include_only_minitest

support only MiniTest run with Isolation test
  • Loading branch information...
2 parents 377a879 + 46761b8 commit 3040940ab5576d8ceb17fa3cc83223815371be7c @spastorino spastorino committed
Showing with 1 addition and 29 deletions.
  1. +1 −29 activesupport/lib/active_support/testing/isolation.rb
View
30 activesupport/lib/active_support/testing/isolation.rb
@@ -38,11 +38,7 @@ def self.forking_env?
end
def self.included(base)
- if defined?(::MiniTest) && base < ::MiniTest::Unit::TestCase
- base.send :include, MiniTest
- elsif defined?(Test::Unit)
- base.send :include, TestUnit
- end
+ base.send :include, MiniTest
end
def _run_class_setup # class setup method should only happen in parent
@@ -52,30 +48,6 @@ def _run_class_setup # class setup method should only happen in parent
end
end
- module TestUnit
- def run(result)
- _run_class_setup
-
- yield(Test::Unit::TestCase::STARTED, name)
-
- @_result = result
-
- serialized = run_in_isolation do |proxy|
- begin
- super(proxy) { }
- rescue Exception => e
- proxy.add_error(Test::Unit::Error.new(name, e))
- end
- end
-
- retval, proxy = Marshal.load(serialized)
- proxy.__replay__(@_result)
-
- yield(Test::Unit::TestCase::FINISHED, name)
- retval
- end
- end
-
module MiniTest
def run(runner)
_run_class_setup

0 comments on commit 3040940

Please sign in to comment.
Something went wrong with that request. Please try again.