Class: Mutant::Config
- Inherits:
-
Object
- Object
- Mutant::Config
- Includes:
- Adamantium::Flat
- Defined in:
- lib/mutant/config.rb
Overview
The configuration of a mutator run
Instance Method Summary collapse
-
#subjects(&block) ⇒ self, Enumerator<Subject>
private
Enumerate subjects.
-
#tests(subject) ⇒ Enumerable<Test>
private
Return tests for mutation.
Instance Method Details
#subjects(&block) ⇒ self, Enumerator<Subject>
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.
Enumerate subjects
26 27 28 29 30 |
# File 'lib/mutant/config.rb', line 26 def subjects(&block) return to_enum(__method__) unless block_given? matcher.each(&block) self end |
#tests(subject) ⇒ 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 for mutation
TODO: This logic is now centralized but still fucked.
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/mutant/config.rb', line 42 def tests(subject) subject.match_expressions.each do |match_expression| tests = integration.all_tests.select do |test| match_expression.prefix?(test.expression) end return tests if tests.any? end EMPTY_ARRAY end |