spec/unit/mutant/matcher/namespace/each_spec.rb in mutant-0.3.0.beta21 vs spec/unit/mutant/matcher/namespace/each_spec.rb in mutant-0.3.0.beta22

- old
+ new

@@ -1,5 +1,7 @@ +# encoding: utf-8 + require 'spec_helper' describe Mutant::Matcher::Namespace, '#each' do subject { object.each { |item| yields << item } } @@ -12,11 +14,15 @@ let(:singleton_b) { double('SingletonB', :name => 'TestApp::Foo') } let(:subject_a) { double('SubjectA') } let(:subject_b) { double('SubjectB') } before do - Mutant::Matcher::Methods::Singleton.stub(:each).with(cache, singleton_a).and_yield(subject_a) - Mutant::Matcher::Methods::Instance.stub(:each).with(cache, singleton_a).and_yield(subject_b) + Mutant::Matcher::Methods::Singleton.stub(:each) + .with(cache, singleton_a) + .and_yield(subject_a) + Mutant::Matcher::Methods::Instance.stub(:each) + .with(cache, singleton_a) + .and_yield(subject_b) ObjectSpace.stub(:each_object => [singleton_a, singleton_b]) end context 'with no block' do subject { object.each }