Sha256: d5cbaef616fe32f8f5504253f0cd5a96521bc4e4c85dac7dfc46d3e6cd03f23b

Contents?: true

Size: 407 Bytes

Versions: 1

Compression:

Stored size: 407 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) }
  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

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongoid-minitest-0.0.2 test/matchers/associations_test.rb