Sha256: f23581e96c73a032f822f15b5ab108bb4d2787459b5b2fdd01384129ba2d4e50

Contents?: true

Size: 583 Bytes

Versions: 2

Compression:

Stored size: 583 Bytes

Contents

class Spork::RunStrategy::Forking < Spork::RunStrategy
  def self.available?
    Kernel.respond_to?(:fork)
  end

  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
      test_framework.run_tests(argv, stderr, stdout)
    end
    @child.result
  end

  def abort
    @child && @child.abort
  end

  def preload
    require test_framework.entry_point
    test_framework.preload
  end

  def running?
    @child && @child.running?
  end

end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
timcharper-spork-0.6.2 lib/spork/run_strategy/forking.rb
spork-0.6.2 lib/spork/run_strategy/forking.rb