test/unit/associations/test_base.rb in mongo_mapper-0.6.10 vs test/unit/associations/test_base.rb in mongo_mapper-0.7.0

- old
+ new

@@ -2,11 +2,11 @@ require 'models' class FooMonster; end class AssociationBaseTest < Test::Unit::TestCase - include MongoMapper::Associations + include MongoMapper::Plugins::Associations should "initialize with type and name" do base = Base.new(:many, :foos) base.type.should == :many base.name.should == :foos @@ -102,23 +102,23 @@ should "be false if not one" do Base.new(:many, :foo).in_array?.should be_false end end - context "finder_options" do + context "query_options" do should "default to empty hash" do base = Base.new(:many, :foos) - base.finder_options.should == {} + base.query_options.should == {} end should "work with order" do base = Base.new(:many, :foos, :order => 'position') - base.finder_options.should == {:order => 'position'} + base.query_options.should == {:order => 'position'} end should "correctly parse from options" do base = Base.new(:many, :foos, :order => 'position', :somekey => 'somevalue') - base.finder_options.should == {:order => 'position', :somekey => 'somevalue'} + base.query_options.should == {:order => 'position', :somekey => 'somevalue'} end end context "type_key_name" do should "be _type for many" do \ No newline at end of file