module ActiveSupport::Testing::Isolation
def self.forking_env?
def self.forking_env? !ENV["NO_FORK"] && Process.respond_to?(:fork) end
def self.included(klass) #:nodoc:
def self.included(klass) #:nodoc: klass.class_eval do parallelize_me! end end
def _run_class_setup # class setup method should only happen in parent
def _run_class_setup # class setup method should only happen in parent @@class_setup_mutex.synchronize do unless defined?(@@ran_class_setup) || ENV['ISOLATION_TEST'] self.class.setup if self.class.respond_to?(:setup) @@ran_class_setup = true end end end
def run
def run serialized = run_in_isolation do super end Marshal.load(serialized) end