Class: Mutant::Test::Runner::Sink Private
- Inherits:
-
Object
- Object
- Mutant::Test::Runner::Sink
- Defined in:
- lib/mutant/test/runner/sink.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize ⇒ undefined
constructor
private
Initialize object.
-
#response(response) ⇒ self
private
Handle mutation finish.
-
#status ⇒ Result::Env
private
Runner status.
-
#stop? ⇒ Boolean
private
Test if scheduling stopped.
Constructor Details
#initialize ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize object
12 13 14 15 16 |
# File 'lib/mutant/test/runner/sink.rb', line 12 def initialize(*) super @start = env.world.timer.now @test_results = [] end |
Instance Method Details
#response(response) ⇒ self
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Handle mutation finish
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/mutant/test/runner/sink.rb', line 39 def response(response) if response.error env.world.stderr.puts(response.log) fail response.error end @test_results << response.result.with( job_index: response.job.index, output: response.log ) self end |
#status ⇒ Result::Env
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Runner status
21 22 23 24 25 26 27 |
# File 'lib/mutant/test/runner/sink.rb', line 21 def status Result::TestEnv.new( env:, runtime: env.world.timer.now - @start, test_results: @test_results.sort_by!(&:job_index) ) end |
#stop? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Test if scheduling stopped
32 33 34 |
# File 'lib/mutant/test/runner/sink.rb', line 32 def stop? status.stop? end |