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? ⇒ Boolean
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
26 27 28 29 |
# File 'lib/mutant/runner/subject.rb', line 26 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
37 38 39 |
# File 'lib/mutant/runner/subject.rb', line 37 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
13 14 15 |
# File 'lib/mutant/runner/subject.rb', line 13 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
45 46 47 |
# File 'lib/mutant/runner/subject.rb', line 45 def failed_mutations mutations.reject(&:success?) 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 subject was processed successful
56 57 58 |
# File 'lib/mutant/runner/subject.rb', line 56 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
66 67 68 |
# File 'lib/mutant/runner/subject.rb', line 66 def tests config.tests(subject) end |