test/unit/cursor_test.rb in mongo-1.12.0.rc1 vs test/unit/cursor_test.rb in mongo-1.12.0.rc2

- old
+ new

@@ -136,11 +136,19 @@ should "use the specified batch_size" do @cursor.batch_size(100) assert_equal 100, @cursor.batch_size end - context "conected to mongos" do + context 'when an alternate namespace is specified' do + + should 'use the alternate namespace' do + cursor = Cursor.new(@collection, :ns => 'other_db.other_collection') + assert_equal('other_db.other_collection', cursor.full_collection_name) + end + end + + context "connected to mongos" do setup do @connection.stubs(:mongos?).returns(true) @tag_sets = [{:dc => "ny"}] end @@ -209,10 +217,10 @@ cursor = Cursor.new(@collection, { :read => :secondary_preferred, :tag_sets => nil }) assert !cursor.construct_query_spec.has_key?('$readPreference') end end - context "not conected to mongos" do + context "not connected to mongos" do setup do @connection.stubs(:mongos?).returns(false) end should "not set $readPreference" do