test/unit/pool_manager_test.rb in mongo-1.8.4 vs test/unit/pool_manager_test.rb in mongo-1.8.5
- old
+ new
@@ -50,10 +50,11 @@
@ismaster.merge({'arbiterOnly' => true})
)
seeds = [['localhost', 27017]]
manager = Mongo::PoolManager.new(@client, seeds)
+ @client.stubs(:local_manager).returns(manager)
manager.connect
assert_equal ['localhost', 27017], manager.primary
assert_equal 27017, manager.primary_pool.port
assert_equal 2, manager.secondaries.length
@@ -75,10 +76,11 @@
@ismaster.merge({'secondary' => true}),
@ismaster.merge({'arbiterOnly' => true})
)
seeds = [['localhost', 27017]]
- manager = Mongo::PoolManager.new(@client, seeds)
+ manager = PoolManager.new(@client, seeds)
+ @client.stubs(:local_manager).returns(manager)
manager.connect
assert_equal ['localhost', 27018], manager.primary
assert_equal 27018, manager.primary_pool.port
assert_equal 1, manager.secondaries.length