Sha256: b8fe16d68e241f9c5cdd6f8b43295331797d9c56f2be50836d96bdd0fee19e8c

Contents?: true

Size: 779 Bytes

Versions: 1

Compression:

Stored size: 779 Bytes

Contents

# require 'spec_helper'
# 
# describe "Associations" do
#   describe User do
#     subject { User }
#     
#     it { should reference_many :articles }
#     it { should reference_many :comments }    
#     it { should embed_one :profile }
#   end
#   
#   describe Profile do
#     subject { Profile }
#     
#     it { should be_embedded_in(:user).as_inverse_of(:profile) }
#   end
#   
#   describe Article do
#     subject { Article }
#     
#     it { should be_referenced_in(:user).as_inverse_of(:articles) }
#     it { should embed_many(:comments) }
#   end
#   
#   describe Comment do
#     subject { Comment }
#     
#     it { should be_embedded_in(:article).as_inverse_of(:comments) }
#     it { should be_referenced_in(:user).as_inverse_of(:comments) }
#   end
# end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongoid-rspec-1.2.0 spec/unit/associations_spec.rb