module ActiveSupport::Testing::Isolation

Public Class Methods

forking_env?() click to toggle source
# File lib/active_support/testing/isolation.rb, line 12
def self.forking_env?
  !ENV["NO_FORK"] && Process.respond_to?(:fork)
end

Public Instance Methods

_run_class_setup() click to toggle source
# File lib/active_support/testing/isolation.rb, line 18
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
run() click to toggle source
Calls superclass method
# File lib/active_support/testing/isolation.rb, line 27
def run
  serialized = run_in_isolation do
    super
  end

  Marshal.load(serialized)
end