Class: MagazineSlave
- Inherits:
-
Object
- Object
- MagazineSlave
- Includes:
- DRb::DRbUndumped
- Defined in:
- lib/spork/run_strategy/magazine/magazine_slave.rb
Instance Attribute Summary collapse
-
#id_num ⇒ Object
readonly
Returns the value of attribute id_num.
Instance Method Summary collapse
-
#initialize(id_num, test_framework_short_name) ⇒ MagazineSlave
constructor
A new instance of MagazineSlave.
- #preload ⇒ Object
- #run(argv, stderr, stdout) ⇒ Object
Constructor Details
#initialize(id_num, test_framework_short_name) ⇒ MagazineSlave
Returns a new instance of MagazineSlave.
9 10 11 12 13 14 15 16 |
# File 'lib/spork/run_strategy/magazine/magazine_slave.rb', line 9 def initialize(id_num, test_framework_short_name) @id_num = id_num @test_framework = Spork::TestFramework.factory(STDOUT, STDERR, test_framework_short_name) # ENV["DRB"] = 'true' # Spork.using_spork! return(nil) unless preload end |
Instance Attribute Details
#id_num ⇒ Object (readonly)
Returns the value of attribute id_num.
8 9 10 |
# File 'lib/spork/run_strategy/magazine/magazine_slave.rb', line 8 def id_num @id_num end |
Instance Method Details
#preload ⇒ Object
26 27 28 |
# File 'lib/spork/run_strategy/magazine/magazine_slave.rb', line 26 def preload @test_framework.preload end |
#run(argv, stderr, stdout) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/spork/run_strategy/magazine/magazine_slave.rb', line 18 def run(argv, stderr, stdout) $stdout, $stderr = stdout, stderr Spork.exec_each_run load @test_framework.helper_file @test_framework.run_tests(argv, stderr, stdout) puts " <-- Slave(#{@id_num}) run done!"; stdout.flush end |