Sha256: 0f19d1e228d1fd33218883d1f51ce411a854b7dfcd3275a95fe647b90e951d9e
Contents?: true
Size: 827 Bytes
Versions: 11
Compression:
Stored size: 827 Bytes
Contents
require 'spec_helper' require 'dm-core/support/subject_set' require 'unit/data_mapper/subject_set/shared/to_ary_spec' describe 'DataMapper::SubjectSet#to_ary' do before :all do class ::Person attr_reader :name def initialize(name) @name = name end end end subject { set.to_ary } let(:set) { DataMapper::SubjectSet.new(entries) } let(:entry1) { Person.new('Alice') } let(:entry2) { Person.new('Bob' ) } context 'when no entries are present' do let(:entries) { [] } it_should_behave_like 'DataMapper::SubjectSet#to_ary when no entries are present' end context 'when entries are present' do let(:entries) { [ entry1, entry2 ] } it_should_behave_like 'DataMapper::SubjectSet#to_ary when entries are present' end end
Version data entries
11 entries across 11 versions & 3 rubygems