mirror of https://github.com/rails/rails
AS::Isolation functional on Windows/JRuby.
Doesn't make up for the fact that it's slooooooooow, though. Signed-off-by: wycats <wycats@gmail.com>
This commit is contained in:
parent
7710a8cb6b
commit
b549d93d2f
|
@ -45,12 +45,16 @@ module ActiveSupport
|
|||
end
|
||||
end
|
||||
|
||||
module TestUnit
|
||||
def run(result)
|
||||
unless defined?(@@ran_class_setup)
|
||||
def _run_class_setup # class setup method should only happen in parent
|
||||
unless defined?(@@ran_class_setup) || ENV['ISOLATION_TEST']
|
||||
self.class.setup if self.class.respond_to?(:setup)
|
||||
@@ran_class_setup = true
|
||||
end
|
||||
end
|
||||
|
||||
module TestUnit
|
||||
def run(result)
|
||||
_run_class_setup
|
||||
|
||||
yield(Test::Unit::TestCase::STARTED, name)
|
||||
|
||||
|
@ -74,10 +78,7 @@ module ActiveSupport
|
|||
|
||||
module MiniTest
|
||||
def run(runner)
|
||||
unless defined?(@@ran_class_setup)
|
||||
self.class.setup if self.class.respond_to?(:setup)
|
||||
@@ran_class_setup = true
|
||||
end
|
||||
_run_class_setup
|
||||
|
||||
serialized = run_in_isolation do |isolated_runner|
|
||||
super(isolated_runner)
|
||||
|
@ -109,6 +110,8 @@ module ActiveSupport
|
|||
end
|
||||
|
||||
module Subprocess
|
||||
ORIG_ARGV = ARGV.dup unless defined?(ORIG_ARGV)
|
||||
|
||||
# Crazy H4X to get this working in windows / jruby with
|
||||
# no forking.
|
||||
def run_in_isolation(&blk)
|
|
@ -1,5 +1,3 @@
|
|||
ORIG_ARGV = ARGV.dup
|
||||
|
||||
require File.expand_path("../../../load_paths", __FILE__)
|
||||
|
||||
require 'stringio'
|
Loading…
Reference in New Issue