Class: Mutant::Runner::Sink Private
- Inherits:
-
Object
- Object
- Mutant::Runner::Sink
- Defined in:
- lib/mutant/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.
-
#result(mutation_result) ⇒ 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
9 10 11 12 13 |
# File 'lib/mutant/runner/sink.rb', line 9 def initialize(*) super @start = Time.now @subject_results = {} end |
Instance Method Details
#result(mutation_result) ⇒ 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
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/mutant/runner/sink.rb', line 38 def result(mutation_result) subject = mutation_result.mutation.subject @subject_results[subject] = Result::Subject.new( subject: subject, mutation_results: previous_mutation_results(subject) + [mutation_result], tests: mutation_result.test_result.tests ) 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
18 19 20 21 22 23 24 |
# File 'lib/mutant/runner/sink.rb', line 18 def status Result::Env.new( env: env, runtime: Time.now - @start, subject_results: @subject_results.values ) 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
29 30 31 |
# File 'lib/mutant/runner/sink.rb', line 29 def stop? env.config.fail_fast && !status.subject_results.all?(&:success?) end |