Class: TestRunner::Runner
- Inherits:
-
Object
- Object
- TestRunner::Runner
- Defined in:
- lib/test_runner/runner.rb
Defined Under Namespace
Classes: ProcessSet
Instance Attribute Summary collapse
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#pids ⇒ Object
readonly
Returns the value of attribute pids.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(files) ⇒ Runner
constructor
A new instance of Runner.
- #run_all ⇒ Object
Constructor Details
#initialize(files) ⇒ Runner
Returns a new instance of Runner.
11 12 13 |
# File 'lib/test_runner/runner.rb', line 11 def initialize files @files = files end |
Instance Attribute Details
#files ⇒ Object (readonly)
Returns the value of attribute files.
8 9 10 |
# File 'lib/test_runner/runner.rb', line 8 def files @files end |
#pids ⇒ Object (readonly)
Returns the value of attribute pids.
9 10 11 |
# File 'lib/test_runner/runner.rb', line 9 def pids @pids end |
Class Method Details
.call(paths) ⇒ Object
3 4 5 6 |
# File 'lib/test_runner/runner.rb', line 3 def self.call paths instance = new paths instance.call end |
Instance Method Details
#call ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/test_runner/runner.rb', line 15 def call Config.internal_logger.debug "test_runner found #{files.size} files: #{files * ", "}" return if files.empty? result = run_all log_msg = "finished executing files; success=#{result.inspect}" if result Config.logger.info log_msg else Config.logger.warn log_msg end result end |
#run_all ⇒ Object
30 31 32 33 34 35 |
# File 'lib/test_runner/runner.rb', line 30 def run_all set = ProcessSet.new Signal.trap "INT" do set.shutdown end set << files.shift until files.empty? set.finish end |