Fix begin mutator to visit children

This commit is contained in:
Markus Schirp 2013-07-25 20:23:30 +02:00
parent b88d3ccc87
commit 811b4737da
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -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'