Sha256: 3cf1b7e7271be390ff940321c1304ff5f99ae996c69603ff0d6ab2c253489b98
Contents?: true
Size: 630 Bytes
Versions: 2
Compression:
Stored size: 630 Bytes
Contents
require 'test_helper' describe "Associations" do 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 } it { must belong_to(:person).of_type(Person) } end 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
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mongoid-minitest-0.0.3.1 | test/matchers/associations_test.rb |
mongoid-minitest-0.0.3 | test/matchers/associations_test.rb |