Restore Mutatee#each spec
This commit is contained in:
parent
04e4f454ec
commit
6d7438f144
2 changed files with 11 additions and 3 deletions
|
@ -29,9 +29,17 @@ module Mutant
|
|||
#
|
||||
# @api private
|
||||
#
|
||||
def each(&block)
|
||||
def each
|
||||
return to_enum unless block_given?
|
||||
Mutator.each(node, &block)
|
||||
# FIXME:
|
||||
# Rubinus <=> Rspec bug
|
||||
#
|
||||
# Mutator.each(node,&block)
|
||||
#
|
||||
# results in rspec expectation mismatch
|
||||
Mutator.each(node) do |mutant|
|
||||
yield mutant
|
||||
end
|
||||
|
||||
self
|
||||
end
|
||||
|
|
|
@ -14,7 +14,7 @@ describe Mutant::Mutatee, '#each' do
|
|||
Mutant::Mutator.stub(:each).with(ast).and_yield(mutation).and_return(Mutant::Mutator)
|
||||
end
|
||||
|
||||
#it_should_behave_like 'an #each method'
|
||||
it_should_behave_like 'an #each method'
|
||||
|
||||
it 'should initialize mutator with ast' do
|
||||
Mutant::Mutator.should_receive(:each).with(ast).and_yield(mutation).and_return(Mutant::Mutator)
|
||||
|
|
Loading…
Reference in a new issue