minor: test and doc fixes
This commit is contained in:
parent
05bf234bb8
commit
025e56732e
@ -82,7 +82,7 @@ if !defined?(RUBY_ENGINE) || (RUBY_ENGINE == 'ruby' && RUBY_VERSION < '1.9.0')
|
|||||||
require 'system_timer'
|
require 'system_timer'
|
||||||
Mongo::TimeoutHandler = SystemTimer
|
Mongo::TimeoutHandler = SystemTimer
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
warn "Could not load SystemTimer gem. Falling back to timeout.rb." +
|
warn "Could not load SystemTimer gem. Falling back to timeout.rb. " +
|
||||||
"SystemTimer is STRONGLY recommended for timeouts in Ruby 1.8.7. " +
|
"SystemTimer is STRONGLY recommended for timeouts in Ruby 1.8.7. " +
|
||||||
"See http://ph7spot.com/musings/system-timer for details."
|
"See http://ph7spot.com/musings/system-timer for details."
|
||||||
require 'timeout'
|
require 'timeout'
|
||||||
|
@ -17,10 +17,6 @@
|
|||||||
# ++
|
# ++
|
||||||
|
|
||||||
require 'digest/md5'
|
require 'digest/md5'
|
||||||
begin
|
|
||||||
require 'mime/types'
|
|
||||||
rescue LoadError
|
|
||||||
end
|
|
||||||
|
|
||||||
module Mongo
|
module Mongo
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ class TestConnection < Test::Unit::TestCase
|
|||||||
@conn.lock!
|
@conn.lock!
|
||||||
assert @conn.locked?
|
assert @conn.locked?
|
||||||
assert_equal 1, @conn['admin']['$cmd.sys.inprog'].find_one['fsyncLock'], "Not fsync-locked"
|
assert_equal 1, @conn['admin']['$cmd.sys.inprog'].find_one['fsyncLock'], "Not fsync-locked"
|
||||||
assert_match /unlock/, @conn.unlock!['info']
|
assert_match(/unlock/, @conn.unlock!['info'])
|
||||||
unlocked = false
|
unlocked = false
|
||||||
counter = 0
|
counter = 0
|
||||||
while counter < 5
|
while counter < 5
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
require './test/test_helper'
|
require './test/test_helper'
|
||||||
require 'mongo/exceptions'
|
require 'mongo/exceptions'
|
||||||
require 'mongo/util/conversions'
|
require 'mongo/util/conversions'
|
||||||
require 'bson/ordered_hash'
|
|
||||||
|
|
||||||
class ConversionsTest < Test::Unit::TestCase
|
class ConversionsTest < Test::Unit::TestCase
|
||||||
include Mongo::Conversions
|
include Mongo::Conversions
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
require './test/test_helper'
|
require './test/test_helper'
|
||||||
include Mongo
|
|
||||||
|
|
||||||
class GridFileSystemTest < Test::Unit::TestCase
|
class GridFileSystemTest < Test::Unit::TestCase
|
||||||
context "GridFileSystem:" do
|
context "GridFileSystem:" do
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
require './test/test_helper'
|
require './test/test_helper'
|
||||||
include Mongo
|
|
||||||
|
|
||||||
class GridIOTest < Test::Unit::TestCase
|
class GridIOTest < Test::Unit::TestCase
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
require './test/test_helper'
|
require './test/test_helper'
|
||||||
|
|
||||||
class SupportTest < Test::Unit::TestCase
|
class SupportTest < Test::Unit::TestCase
|
||||||
include Mongo
|
|
||||||
|
|
||||||
def test_command_response_succeeds
|
def test_command_response_succeeds
|
||||||
assert Support.ok?('ok' => 1)
|
assert Support.ok?('ok' => 1)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
||||||
require 'rubygems' if ENV['C_EXT']
|
require 'rubygems' if RUBY_VERSION < '1.9.0' && ENV['C_EXT']
|
||||||
require 'mongo'
|
require 'mongo'
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
|
|
||||||
@ -12,9 +12,9 @@ def silently
|
|||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'rubygems'
|
require 'rubygems' if RUBY_VERSION < "1.9.0" && !ENV['C_EXT']
|
||||||
silently { require 'shoulda' }
|
silently { require 'shoulda' }
|
||||||
require 'mocha'
|
silently { require 'mocha' }
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
puts <<MSG
|
puts <<MSG
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user