跳至内容 跳至搜索
命名空间
方法
F
R

常量

SubprocessCrashed = Class.new(StandardError)
 

类公共方法

forking_env?()

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

实例公共方法

run()

# File activesupport/lib/active_support/testing/isolation.rb, line 20
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