minor: silence some warning due to deprecaton

This commit is contained in:
Kyle Banker 2010-08-04 16:47:13 -04:00
parent 9e223f4510
commit db8ddd059b
6 changed files with 11 additions and 11 deletions

View File

@ -260,7 +260,7 @@ module Mongo
# run the operation in safe mode, which run a getlasterror command on the
# database to report any assertion. In addition, a hash can be provided to
# run an fsync and/or wait for replication of the remove (>= 1.5.1). See the options
# for DB#error.
# for DB#get_last_error.
#
# @example remove all documents from the 'users' collection:
# users.remove

View File

@ -398,7 +398,7 @@ module Mongo
# @param [Hash] last_error_params parameters to be sent to getLastError. See DB#error for
# available options.
#
# @see DB#error for valid last error params.
# @see DB#get_last_error for valid last error params.
#
# @return [Array]
# An array whose indexes include [0] documents returned, [1] number of document received,

View File

@ -1,4 +1,4 @@
require 'test/test_helper'
require './test/test_helper'
class TestCollection < Test::Unit::TestCase
@@connection ||= Connection.new(ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost', ENV['MONGO_RUBY_DRIVER_PORT'] || Connection::DEFAULT_PORT)

View File

@ -15,7 +15,7 @@ class TestConnection < Test::Unit::TestCase
end
def teardown
@mongo.db(MONGO_TEST_DB).error
@mongo[MONGO_TEST_DB].get_last_error
end
def test_slave_ok_with_multiple_nodes

View File

@ -19,7 +19,7 @@ class DBAPITest < Test::Unit::TestCase
def teardown
@@coll.remove
@@db.error
@@db.get_last_error
end
def test_clear

View File

@ -164,30 +164,30 @@ class DBTest < Test::Unit::TestCase
def test_error
@@db.reset_error_history
assert_nil @@db.error
assert_nil @@db.get_last_error['err']
assert !@@db.error?
assert_nil @@db.previous_error
@@db.command({:forceerror => 1}, :check_response => false)
assert @@db.error?
assert_not_nil @@db.error
assert_not_nil @@db.get_last_error['err']
assert_not_nil @@db.previous_error
@@db.command({:forceerror => 1}, :check_response => false)
assert @@db.error?
assert @@db.error
assert @@db.get_last_error['err']
prev_error = @@db.previous_error
assert_equal 1, prev_error['nPrev']
assert_equal prev_error["err"], @@db.error
assert_equal prev_error["err"], @@db.get_last_error['err']
@@db.collection('test').find_one
assert_nil @@db.error
assert_nil @@db.get_last_error['err']
assert !@@db.error?
assert @@db.previous_error
assert_equal 2, @@db.previous_error['nPrev']
@@db.reset_error_history
assert_nil @@db.error
assert_nil @@db.get_last_error['err']
assert !@@db.error?
assert_nil @@db.previous_error
end