spec/unit/associations_spec.rb in mongoid-rspec-1.4.2 vs spec/unit/associations_spec.rb in mongoid-rspec-1.4.3

- old
+ new

@@ -6,12 +6,12 @@ it { should have_many(:articles).with_foreign_key(:author_id) } it { should reference_one(:record) } it { should have_one(:record) } - it { should reference_many(:comments).with_dependent(:destroy) } - it { should have_many(:comments).with_dependent(:destroy) } + it { should reference_many(:comments).with_dependent(:destroy).with_autosave } + it { should have_many(:comments).with_dependent(:destroy).with_autosave } it { should embed_one :profile } it { should reference_and_be_referenced_in_many(:children).of_type(User) } it { should have_and_belong_to_many(:children) } @@ -36,7 +36,11 @@ it { should be_referenced_in(:user).as_inverse_of(:record) } end describe Permalink do it { should be_embedded_in(:linkable).as_inverse_of(:link) } + end + + describe Site do + it { should reference_many(:users).as_inverse_of(:site) } end end