Sha256: 3d4efb7e662000b15a5f79dc9c4dac83009dae3a8c4586fd77e508044f2bfeb4

Contents?: true

Size: 598 Bytes

Versions: 23

Compression:

Stored size: 598 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
      result = test_framework.run_tests(argv, stderr, stdout)
      Spork.exec_after_each_run
      result
    end
    @child.result
  end

  def abort
    @child && @child.abort
  end

  def preload
    test_framework.preload
  end

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

end

Version data entries

23 entries across 23 versions & 5 rubygems

Version Path
panjiva-spork-0.8.6 lib/spork/run_strategy/forking.rb
panjiva-spork-0.8.5.1 lib/spork/run_strategy/forking.rb
panjiva-spork-0.8.5 lib/spork/run_strategy/forking.rb
spork-0.8.5 lib/spork/run_strategy/forking.rb
spork-0.9.0.rc3 lib/spork/run_strategy/forking.rb
nimboids-spork-0.8.99 lib/spork/run_strategy/forking.rb
nimboids-spork-0.9.0.rc2 lib/spork/run_strategy/forking.rb
invo-sporknife-0.1.0.3 lib/spork/run_strategy/forking.rb
invo-sporknife-0.1.0.2 lib/spork/run_strategy/forking.rb
invo-sporknife-0.1.0.1 lib/spork/run_strategy/forking.rb
invo-sporknife-0.1.0 lib/spork/run_strategy/forking.rb
invo-sporknife-0.1.0.pre lib/spork/run_strategy/forking.rb
spork-0.9.0.rc2 lib/spork/run_strategy/forking.rb
spork-0.9.0.rc lib/spork/run_strategy/forking.rb
wakiki-spork-0.8.5 lib/spork/run_strategy/forking.rb
spork-0.8.4 lib/spork/run_strategy/forking.rb
spork-0.8.3 lib/spork/run_strategy/forking.rb
spork-0.8.2 lib/spork/run_strategy/forking.rb
spork-0.8.1 lib/spork/run_strategy/forking.rb
spork-0.8.0 lib/spork/run_strategy/forking.rb