Class: Mutant::Runner::Subject
- Inherits:
-
Mutant::Runner
- Object
- Mutant::Runner
- Mutant::Runner::Subject
- Defined in:
- lib/mutant/runner/subject.rb
Overview
Subject specific runner
Constant Summary
Constants inherited from Mutant::Runner
Instance Attribute Summary collapse
-
#mutations ⇒ Enumerable<Runner::Mutation>
readonly
private
Return mutation runners.
-
#subject ⇒ Subject
readonly
private
Return subject.
Attributes inherited from Mutant::Runner
Instance Method Summary collapse
-
#failed_mutations ⇒ Enumerable<Mutation>
private
Return failed mutations.
-
#initialize(config, subject) ⇒ undefined
constructor
private
Initialize object.
-
#success? ⇒ true, false
private
Test if subject was processed successful.
-
#tests ⇒ Enumerable<Test>
private
Return tests used to kill mutations on this subject.
Methods inherited from Mutant::Runner
run, #running?, #runtime, #stop?
Constructor Details
#initialize(config, subject) ⇒ 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
28 29 30 31 |
# File 'lib/mutant/runner/subject.rb', line 28 def initialize(config, subject) @subject = subject super(config) end |
Instance Attribute Details
#mutations ⇒ Enumerable<Runner::Mutation> (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 mutation runners
39 40 41 |
# File 'lib/mutant/runner/subject.rb', line 39 def mutations @mutations end |
#subject ⇒ Subject (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 subject
15 16 17 |
# File 'lib/mutant/runner/subject.rb', line 15 def subject @subject end |
Instance Method Details
#failed_mutations ⇒ Enumerable<Mutation>
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 failed mutations
47 48 49 |
# File 'lib/mutant/runner/subject.rb', line 47 def failed_mutations mutations.reject(&:success?) end |
#success? ⇒ true, false
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 subject was processed successful
62 63 64 |
# File 'lib/mutant/runner/subject.rb', line 62 def success? failed_mutations.empty? end |
#tests ⇒ Enumerable<Test>
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 tests used to kill mutations on this subject
72 73 74 |
# File 'lib/mutant/runner/subject.rb', line 72 def tests config.strategy.tests(subject) end |