Sha256: dd15f3ad85638c77013d3da9b911ddbdc12fe70cd9153a62777c3fd7404c5a0b
Contents?: true
Size: 666 Bytes
Versions: 2
Compression:
Stored size: 666 Bytes
Contents
require 'spec_helper' describe "Associations" do describe User do it { should reference_many :articles } it { should reference_many :comments } it { should embed_one :profile } it { should reference_many(:children).stored_as(:array) } end describe Profile do it { should be_embedded_in(:user).as_inverse_of(:profile) } end describe Article do it { should be_referenced_in(:user).as_inverse_of(:articles) } it { should embed_many(:comments) } end describe Comment do 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mongoid-rspec-1.3.2 | spec/unit/associations_spec.rb |
mongoid-rspec-1.2.1 | spec/unit/associations_spec.rb |