Sha256: 7f5ea81b494484486b8e124bba41d19d2dabe96c29090c18e8d19aa053c1bce6
Contents?: true
Size: 502 Bytes
Versions: 1
Compression:
Stored size: 502 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Mapper::Header, '#each' do subject(:header) { Mapper::Header.build([[:id], [:name]]) } let(:id) { header[:id] } let(:name) { header[:name] } context 'with a block' do it 'yields attributes' do result = [] header.each { |attribute| result << attribute } expect(result).to eql([id, name]) end end context 'without a block' do subject { header.each } it { should be_instance_of(Enumerator) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rom-0.2.0 | spec/unit/rom/mapper/header/each_spec.rb |