test/matchers/associations_test.rb in mongoid-minitest-0.0.2 vs test/matchers/associations_test.rb in mongoid-minitest-0.0.3

- old
+ new

@@ -5,10 +5,14 @@ describe Person do subject { Person } it { must have_many(:pets).of_type(Pet) } it { must have_one(:account).of_type(Account) } + it { must have_and_belong_to_many(:friends).of_type(Person) } + + it { must embed_one(:profile) } + it { must embed_many(:sites) } end describe Pet do subject { Pet } @@ -17,8 +21,14 @@ describe Account do subject { Account } it { must belong_to(:person).of_type(Person) } + end + + describe Site do + subject { Site } + + it { must embedded_in(:person) } end end