Special treatment for Noop mutations
Otherwise mutant would run all matched example groups for a noop when it only makes sense to run the first match
This commit is contained in:
parent
26392b0392
commit
868dd0846c
1 changed files with 6 additions and 1 deletions
|
@ -20,7 +20,12 @@ module Mutant
|
|||
def run
|
||||
mutation.insert
|
||||
|
||||
groups = example_groups
|
||||
groups =
|
||||
if mutation.is_a?(Mutation::Neutral::Noop)
|
||||
[example_groups.first]
|
||||
else
|
||||
example_groups
|
||||
end
|
||||
|
||||
unless groups
|
||||
$stderr.puts("No rspec example groups found for: #{match_prefixes.join(', ')}")
|
||||
|
|
Loading…
Add table
Reference in a new issue