minor: fixed some failing tests
This commit is contained in:
parent
ace1313b99
commit
a323911507
|
@ -191,8 +191,10 @@ class OrderedHashTest < Test::Unit::TestCase
|
|||
assert_equal [1, 2, 3, 'foo'], noob.values
|
||||
end
|
||||
|
||||
def test_inspect_retains_order
|
||||
assert_equal "#<BSON::OrderedHash:0x#{@oh.object_id.to_s(16)} {\"c\"=>1, \"a\"=>2, \"z\"=>3}>", @oh.inspect
|
||||
if RUBY_VERSION < "1.9.2"
|
||||
def test_inspect_retains_order
|
||||
assert_equal "#<BSON::OrderedHash:0x#{@oh.object_id.to_s(16)} {\"c\"=>1, \"a\"=>2, \"z\"=>3}>", @oh.inspect
|
||||
end
|
||||
end
|
||||
|
||||
def test_clear
|
||||
|
|
|
@ -5,7 +5,7 @@ class CursorTest < Test::Unit::TestCase
|
|||
setup do
|
||||
@logger = mock()
|
||||
@logger.stubs(:debug)
|
||||
@connection = stub(:class => Connection, :logger => @logger)
|
||||
@connection = stub(:class => Connection, :logger => @logger, :slave_ok? => false)
|
||||
@db = stub(:name => "testing", :slave_ok? => false, :connection => @connection)
|
||||
@collection = stub(:db => @db, :name => "items")
|
||||
@cursor = Cursor.new(@collection)
|
||||
|
@ -100,7 +100,7 @@ class CursorTest < Test::Unit::TestCase
|
|||
setup do
|
||||
@logger = mock()
|
||||
@logger.stubs(:debug)
|
||||
@connection = stub(:class => Connection, :logger => @logger)
|
||||
@connection = stub(:class => Connection, :logger => @logger, :slave_ok? => false)
|
||||
@db = stub(:slave_ok? => true, :name => "testing", :connection => @connection)
|
||||
@collection = stub(:db => @db, :name => "items")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue