Class: Spork::RunStrategy::Forking
Instance Attribute Summary
#test_framework
Class Method Summary
collapse
Instance Method Summary
collapse
#cleanup, #initialize
Class Method Details
.available? ⇒ Boolean
2
3
4
|
# File 'lib/spork/run_strategy/forking.rb', line 2
def self.available?
Kernel.respond_to?(:fork)
end
|
Instance Method Details
#abort ⇒ Object
18
19
20
|
# File 'lib/spork/run_strategy/forking.rb', line 18
def abort
@child && @child.abort
end
|
#preload ⇒ Object
22
23
24
|
# File 'lib/spork/run_strategy/forking.rb', line 22
def preload
test_framework.preload
end
|
#run(argv, stderr, stdout) ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
|
# 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
test_framework.run_tests(argv, stderr, stdout)
end
@child.result
end
|
#running? ⇒ Boolean
26
27
28
|
# File 'lib/spork/run_strategy/forking.rb', line 26
def running?
@child && @child.running?
end
|