Class: Mutiny::Analysis::Results
- Inherits:
-
Object
- Object
- Mutiny::Analysis::Results
- Defined in:
- lib/mutiny/analysis/results.rb
Instance Method Summary collapse
- #add(mutant, test_run) ⇒ Object
- #kill_count ⇒ Object
- #killed?(mutant) ⇒ Boolean
- #mutants ⇒ Object
- #survived?(mutant) ⇒ Boolean
- #test_run_for(mutant) ⇒ Object
Instance Method Details
#add(mutant, test_run) ⇒ Object
4 5 6 7 8 |
# File 'lib/mutiny/analysis/results.rb', line 4 def add(mutant, test_run) mutants << mutant test_runs[mutant] = test_run killed << mutant if mutant.stillborn? || test_run.failed? end |
#kill_count ⇒ Object
10 11 12 |
# File 'lib/mutiny/analysis/results.rb', line 10 def kill_count killed.size end |
#killed?(mutant) ⇒ Boolean
14 15 16 |
# File 'lib/mutiny/analysis/results.rb', line 14 def killed?(mutant) killed.include?(mutant) end |
#mutants ⇒ Object
26 27 28 |
# File 'lib/mutiny/analysis/results.rb', line 26 def mutants @mutants ||= Mutants::MutantSet.new end |
#survived?(mutant) ⇒ Boolean
18 19 20 |
# File 'lib/mutiny/analysis/results.rb', line 18 def survived?(mutant) !killed?(mutant) end |
#test_run_for(mutant) ⇒ Object
22 23 24 |
# File 'lib/mutiny/analysis/results.rb', line 22 def test_run_for(mutant) test_runs[mutant] end |