Fix begin mutator to visit children
This commit is contained in:
parent
b88d3ccc87
commit
811b4737da
2 changed files with 4 additions and 1 deletions
|
@ -21,7 +21,8 @@ module Mutant
|
|||
emit_self(*children)
|
||||
end
|
||||
end
|
||||
children.each do |child|
|
||||
children.each_with_index do |child, index|
|
||||
mutate_child(index)
|
||||
emit(child)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -191,6 +191,8 @@ describe Mutant::Mutator, 'send' do
|
|||
mutations = []
|
||||
mutations << 'foo'
|
||||
mutations << 'left - right'
|
||||
mutations << 'left / foo'
|
||||
mutations << 'right / foo'
|
||||
end
|
||||
|
||||
it_should_behave_like 'a mutator'
|
||||
|
|
Loading…
Reference in a new issue