Sha256: 73b6c88674f7129656969f9061abb95d85543a68669b8c1e2300a5eb6037cabf

Contents?: true

Size: 523 Bytes

Versions: 12

Compression:

Stored size: 523 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.clear
    end

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

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
djsun-mongo_mapper-0.5.6.6 test/functional/test_rails_compatibility.rb
djsun-mongo_mapper-0.5.6.5 test/functional/test_rails_compatibility.rb
mongo_mapper-0.5.7 test/functional/test_rails_compatibility.rb
djsun-mongo_mapper-0.5.6.4 test/functional/test_rails_compatibility.rb
djsun-mongo_mapper-0.5.6.3 test/functional/test_rails_compatibility.rb
djsun-mongo_mapper-0.5.6.2 test/functional/test_rails_compatibility.rb
djsun-mongo_mapper-0.5.6.1 test/functional/test_rails_compatibility.rb
mongo_mapper-0.5.6 test/functional/test_rails_compatibility.rb
djsun-mongo_mapper-0.5.5.3 test/functional/test_rails_compatibility.rb
mongo_mapper-unstable-2009.10.16 test/functional/test_rails_compatibility.rb
djsun-mongo_mapper-0.5.5.2 test/functional/test_rails_compatibility.rb
mongo_mapper-0.5.5 test/functional/test_rails_compatibility.rb