Sha256: db0ecb4273cb0dce3a291e89331119080f42cd6732335e5f9522b1f9e15a1ec8

Contents?: true

Size: 709 Bytes

Versions: 11

Compression:

Stored size: 709 Bytes

Contents

require 'spec_helper'
require 'dm-core/support/subject_set'
require 'unit/data_mapper/subject_set/shared/each_spec'

describe 'DataMapper::SubjectSet' do
  subject { DataMapper::SubjectSet.new }

  it_should_behave_like 'DataMapper::SubjectSet'
end

describe 'DataMapper::SubjectSet#each' do
  before :all do

    class ::Person
      attr_reader :name
      def initialize(name)
        @name = name
      end
    end

  end

  subject { set.each { |entry| yields << entry } }

  let(:set)    { DataMapper::SubjectSet.new([ entry ]) }
  let(:entry)  { Person.new('Alice')                   }
  let(:yields) { []                                    }

  it_should_behave_like 'DataMapper::SubjectSet#each'
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
ardm-core-1.3.0 spec/unit/data_mapper/subject_set/each_spec.rb
ardm-core-1.2.1 spec/unit/data_mapper/subject_set/each_spec.rb
dm-core-1.2.1 spec/unit/data_mapper/subject_set/each_spec.rb
ghost_dm-core-1.3.0.beta spec/unit/data_mapper/subject_set/each_spec.rb
dm-core-1.2.0 spec/unit/data_mapper/subject_set/each_spec.rb
dm-core-1.2.0.rc2 spec/unit/data_mapper/subject_set/each_spec.rb
dm-core-1.2.0.rc1 spec/unit/data_mapper/subject_set/each_spec.rb
dm-core-1.1.0 spec/unit/data_mapper/subject_set/each_spec.rb
dm-core-1.1.0.rc3 spec/unit/data_mapper/subject_set/each_spec.rb
dm-core-1.1.0.rc2 spec/unit/data_mapper/subject_set/each_spec.rb
dm-core-1.1.0.rc1 spec/unit/data_mapper/subject_set/each_spec.rb