Class: Mutant::Strategy::Rspec::ExampleLookup
- Inherits:
-
Object
- Object
- Mutant::Strategy::Rspec::ExampleLookup
- Includes:
- Adamantium::Flat
- Defined in:
- lib/mutant/strategy/rspec/example_lookup.rb
Overview
Example lookup for rspec
Instance Attribute Summary collapse
-
#mutation ⇒ Mutation
readonly
private
Return mutation.
Class Method Summary collapse
-
.run(mutation) ⇒ Enumerable<String>
private
Perform example lookup.
Instance Method Summary collapse
-
#spec_files ⇒ Enumerable<String>
private
Return spec files.
Instance Attribute Details
#mutation ⇒ 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
27 28 29 |
# File 'lib/mutant/strategy/rspec/example_lookup.rb', line 27 def mutation @mutation end |
Class Method Details
.run(mutation) ⇒ Enumerable<String>
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.
Perform example lookup
17 18 19 |
# File 'lib/mutant/strategy/rspec/example_lookup.rb', line 17 def self.run(mutation) new(mutation).spec_files end |
Instance Method Details
#spec_files ⇒ Enumerable<String>
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 spec files
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/mutant/strategy/rspec/example_lookup.rb', line 35 def spec_files expression = glob_expression files = Dir[expression] if files.empty? $stderr.puts("Spec file(s): #{expression.inspect} not found for #{mutation.identification}") end files end |