Sha256: 4235e4b3e6c0149e4cb174e4bf533176ee6790ed3a51a7a26a7c6b5631e1dec6

Contents?: true

Size: 524 Bytes

Versions: 37

Compression:

Stored size: 524 Bytes

Contents

require 'test_helper'

class TestRailsCompatibility < Test::Unit::TestCase
  class Item
    include MongoMapper::EmbeddedDocument
    key :for_all, String
  end
  
  class Order
    include MongoMapper::Document
    many :items, :class_name => 'TestRailsCompatibility::Item'
    key :order_only, String
  end
  
  context "Document" do
    setup do
      Order.collection.remove
    end

    should "alias new to new_record?" do
      instance = Order.new
      instance.new_record?.should == instance.new?
    end
  end
end

Version data entries

37 entries across 37 versions & 7 rubygems

Version Path
mongo_mapper-unstable-2009.12.4 test/functional/test_rails_compatibility.rb
danielharan-mongo_mapper-0.6.5 test/functional/test_rails_compatibility.rb
mongo_mapper-0.6.5 test/functional/test_rails_compatibility.rb
webbynode-mongo_mapper-0.6.4 test/functional/test_rails_compatibility.rb
mongo_mapper-0.6.4 test/functional/test_rails_compatibility.rb
mongo_mapper-0.6.3 test/functional/test_rails_compatibility.rb
mongo_mapper-0.6.2 test/functional/test_rails_compatibility.rb
mongo_mapper-0.6.1 test/functional/test_rails_compatibility.rb
mongo_mapper-unstable-2009.11.18 test/functional/test_rails_compatibility.rb
mongo_mapper-0.6.0 test/functional/test_rails_compatibility.rb
mongo_mapper-unstable-2009.11.8 test/functional/test_rails_compatibility.rb
mongo_mapper-unstable-2009.11.6 test/functional/test_rails_compatibility.rb
djsun-mongo_mapper-0.5.8.2 test/functional/test_rails_compatibility.rb
djsun-mongo_mapper-0.5.8.1 test/functional/test_rails_compatibility.rb
mongo_mapper-unstable-2009.11.2 test/functional/test_rails_compatibility.rb
mongo_mapper-unstable-2009.10.31 test/functional/test_rails_compatibility.rb
mongo_mapper-0.5.8 test/functional/test_rails_compatibility.rb