minor: test fix

This commit is contained in:
Kyle Banker 2010-08-04 18:18:55 -04:00
parent 640f1c0ba5
commit b8137c7833
1 changed files with 2 additions and 2 deletions

View File

@ -8,8 +8,8 @@ class SlaveConnectionTest < Test::Unit::TestCase
@@host = ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost'
@@port = ENV['MONGO_RUBY_DRIVER_PORT'] || Connection::DEFAULT_PORT
conn = Connection.new(@@host, @@port, :slave_ok => true)
cmd = conn['admin'].command(:ismaster => 1)
cmd['ok'] == 1 && cmd['ismaster'] != 1
response = conn['admin'].command(:ismaster => 1)
Mongo::Support.ok?(response['ok']) && response['ismaster'] != 1
end
if self.connect_to_slave