Spork::RunStrategy::Forking

Public Class Methods

available?() click to toggle source
# File lib/spork/run_strategy/forking.rb, line 2
def self.available?
  Kernel.respond_to?(:fork)
end

Public Instance Methods

abort() click to toggle source
# File lib/spork/run_strategy/forking.rb, line 20
def abort
  @child && @child.abort
end
preload() click to toggle source
# File lib/spork/run_strategy/forking.rb, line 24
def preload
  test_framework.preload
end
run(argv, stderr, stdout) click to toggle source
# File lib/spork/run_strategy/forking.rb, line 6
def run(argv, stderr, stdout)
  abort if running?

  @child = ::Spork::Forker.new do
    $stdout, $stderr = stdout, stderr
    load test_framework.helper_file
    Spork.exec_each_run
    result = test_framework.run_tests(argv, stderr, stdout)
    Spork.exec_after_each_run
    result
  end
  @child.result
end
running?() click to toggle source
# File lib/spork/run_strategy/forking.rb, line 28
def running?
  @child && @child.running?
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.