Sha256: 6032f600407f22131ad1aaf70fb51e3c160ea47b0768307cfecf021c7c2981ea

Contents?: true

Size: 625 Bytes

Versions: 2

Compression:

Stored size: 625 Bytes

Contents

# context 'An Exhibit' do
#   
#   setup do
#     @amazonia = Exhibit[:name => 'Amazonia']
#   end
#   
#   specify 'has an animals association' do
#     [@amazonia, Exhibit.new].each do |exhibit|
#       exhibit.animals.class.should == DataMapper::Associations::HasAndBelongsToManyAssociation
#     end
#   end
#   
#   specify 'has many animals' do
#     @amazonia.animals.size.should == 2
#   end
#   
#   specify 'should load associations magically' do
#     Exhibit.all.each do |exhibit|
#       exhibit.animals.each do |animal|
#         animal.exhibits.should.include?(exhibit)
#       end
#     end
#   end
#   
# end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
datamapper-0.1.0 spec/has_and_belongs_to_many.rb
datamapper-0.1.1 spec/has_and_belongs_to_many.rb