Sha256: c9ad86ada112e738fa47d2e122ea9c4720e0207016e634ea0216d7fb7ee35227
Contents?: true
Size: 548 Bytes
Versions: 19
Compression:
Stored size: 548 Bytes
Contents
require 'spec_helper' module Finitio describe Heading, "each" do let(:a){ Attribute.new(:a, intType) } let(:b){ Attribute.new(:b, intType) } let(:h){ Heading.new([a, b]) } context 'without a block' do it 'should return an enumerator' do expect(h.each).to be_a(Enumerator) end end context 'with a block' do it 'should yield each attribute in turn' do seen = [] h.each do |attr| seen << attr end expect(seen).to eq([a, b]) end end end end
Version data entries
19 entries across 19 versions & 1 rubygems