free_mutant/test_app/spec/shared/each_method_behaviour.rb
2012-11-24 22:42:05 +01:00

15 lines
311 B
Ruby

# encoding: utf-8
shared_examples_for 'an #each method' do
it_should_behave_like 'a command method'
context 'with no block' do
subject { object.each }
it { should be_instance_of(to_enum.class) }
it 'yields the expected values' do
subject.to_a.should eql(object.to_a)
end
end
end