Sha256: c9309e4b38f4ab2f35ab1459b854ae958eb2784d1ee699f59e899463c1fd9bcf

Contents?: true

Size: 506 Bytes

Versions: 10

Compression:

Stored size: 506 Bytes

Contents

require 'test_helper'

class EqualityTest < Test::Unit::TestCase
  context "Case equality" do
    setup do
      @person = Doc()
      @address = Doc()

      @person.one :address, :class => @address, :foreign_key => :person_id
      @address.belongs_to :person, :class => @person
    end

    should "work with proxies" do
      person = @person.create!
      address = @address.create!(:person => person)
      @person.should === address.person
      @address.should === person.address
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
mongo_mapper-0.12.0 test/functional/test_equality.rb
lookout-mongo_mapper-0.11.3 test/functional/test_equality.rb
mongo_mapper-0.11.2 test/functional/test_equality.rb
jamieorc-mongo_mapper-0.11.1.1 test/functional/test_equality.rb
mongo_mapper-0.11.1 test/functional/test_equality.rb
mongo_mapper-0.11.0 test/functional/test_equality.rb
mongo_mapper-0.10.1 test/functional/test_equality.rb
mongo_mapper-0.10.0 test/functional/test_equality.rb
mongo_mapper-0.9.2 test/functional/test_equality.rb
mongo_mapper-0.9.1 test/functional/test_equality.rb