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
mrkurt-mongo_mapper-0.6.11 test/functional/test_rails_compatibility.rb
mongo_mapper-unstable-2010.1.6 test/functional/test_rails_compatibility.rb
mongo_mapper-unstable-2010.1.5 test/functional/test_rails_compatibility.rb
mongo_mapper-unstable-2010.1.4 test/functional/test_rails_compatibility.rb
tpitale-mongo_mapper-0.6.10 test/functional/test_rails_compatibility.rb
mrkurt-mongo_mapper-0.6.10 test/functional/test_rails_compatibility.rb
mongo_mapper-0.6.10 test/functional/test_rails_compatibility.rb
mrkurt-mongo_mapper-0.6.9 test/functional/test_rails_compatibility.rb
mongo_mapper-0.6.9 test/functional/test_rails_compatibility.rb
mrkurt-mongo_mapper-0.6.8 test/functional/test_rails_compatibility.rb
tpitale-mongo_mapper-0.6.9 test/functional/test_rails_compatibility.rb
mongo_mapper-unstable-2009.12.30 test/functional/test_rails_compatibility.rb
mongo_mapper-unstable-2009.12.29 test/functional/test_rails_compatibility.rb
mongo_mapper-unstable-2009.12.23 test/functional/test_rails_compatibility.rb
mongo_mapper-unstable-2009.12.22 test/functional/test_rails_compatibility.rb
mongo_mapper-unstable-2009.12.16 test/functional/test_rails_compatibility.rb
mongo_mapper-0.6.8 test/functional/test_rails_compatibility.rb
mongo_mapper-unstable-2009.12.14 test/functional/test_rails_compatibility.rb
mongo_mapper-0.6.7 test/functional/test_rails_compatibility.rb
mongo_mapper-0.6.6 test/functional/test_rails_compatibility.rb