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! unless Minitest.parallel_executor.is_a?(ActiveSupport::Testing::ParallelizeExecutor) end end
def run
def run status, serialized = run_in_isolation do super end unless status&.success? error = SubprocessCrashed.new("Subprocess exited with an error: #{status.inspect}\noutput: #{serialized.inspect}") error.set_backtrace(caller) self.failures << Minitest::UnexpectedError.new(error) return defined?(Minitest::Result) ? Minitest::Result.from(self) : dup end Marshal.load(serialized) end