Sha256: 3c963d49ae39480f3f7cf0034d8953df664faead39973dde3da75c151dfc9c11

Contents?: true

Size: 695 Bytes

Versions: 2

Compression:

Stored size: 695 Bytes

Contents

require_relative '../../../spec_helper'
require 'dm-core/support/subject_set'
require_relative 'shared/each_spec'

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

  it_behaves_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_behaves_like 'DataMapper::SubjectSet#each'
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sbf-dm-core-1.3.0 spec/unit/data_mapper/subject_set/each_spec.rb
sbf-dm-core-1.3.0.beta spec/unit/data_mapper/subject_set/each_spec.rb