Class: Mutiny::Analysis::Results

Inherits:
Object
  • Object
show all
Defined in:
lib/mutiny/analysis/results.rb

Instance Method Summary collapse

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_countObject



10
11
12
# File 'lib/mutiny/analysis/results.rb', line 10

def kill_count
  killed.size
end

#killed?(mutant) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/mutiny/analysis/results.rb', line 14

def killed?(mutant)
  killed.include?(mutant)
end

#mutantsObject



26
27
28
# File 'lib/mutiny/analysis/results.rb', line 26

def mutants
  @mutants ||= Mutants::MutantSet.new
end

#survived?(mutant) ⇒ Boolean

Returns:

  • (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