diff --git a/test/slave_connection_test.rb b/test/slave_connection_test.rb index 429ea21..17c4381 100644 --- a/test/slave_connection_test.rb +++ b/test/slave_connection_test.rb @@ -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