Class: Mutant::Runner::Killer

Inherits:
Mutant::Runner show all
Defined in:
lib/mutant/runner/killer.rb

Overview

Killer runner

Constant Summary

Constants inherited from Mutant::Runner

REGISTRY

Instance Attribute Summary collapse

Attributes inherited from Mutant::Runner

#config

Instance Method Summary collapse

Methods inherited from Mutant::Runner

run, #running?, #runtime, #stop?

Constructor Details

#initialize(config, killer) ⇒ 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

Parameters:



53
54
55
56
# File 'lib/mutant/runner/killer.rb', line 53

def initialize(config, killer)
  @killer = killer
  super(config)
end

Instance Attribute Details

#reportKiller::Report (readonly)

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.

Return kill report

Returns:



24
25
26
# File 'lib/mutant/runner/killer.rb', line 24

def report
  @report
end

Instance Method Details

#mutation_dead?Boolean

Test if this killer ALONE can determine if mutation is dead

Returns:

  • (Boolean)


39
40
41
42
# File 'lib/mutant/runner/killer.rb', line 39

def mutation_dead?
  test_report = report.test_report
  killer.mutation.should_fail? && test_report.failed?
end

#success?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 killer ran successfully

Returns:

  • (Boolean)


31
32
33
# File 'lib/mutant/runner/killer.rb', line 31

def success?
  @report.success?
end