minor: fix default timeout option
This commit is contained in:
parent
b1cf0d1e13
commit
c9573f05ad
|
@ -45,7 +45,7 @@ module Mongo
|
|||
@order = options[:order]
|
||||
@hint = options[:hint]
|
||||
@snapshot = options[:snapshot]
|
||||
@timeout = options[:timeout] || false
|
||||
@timeout = options[:timeout] || true
|
||||
@explain = options[:explain]
|
||||
@socket = options[:socket]
|
||||
@tailable = options[:tailable] || false
|
||||
|
|
|
@ -297,6 +297,11 @@ class TestCollection < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_defualt_timeout
|
||||
cursor = @@test.find
|
||||
assert_equal true, cursor.timeout
|
||||
end
|
||||
|
||||
def test_fields_as_hash
|
||||
@@test.save(:a => 1, :b => 1, :c => 1)
|
||||
|
||||
|
|
|
@ -9,6 +9,10 @@ class CursorTest < Test::Unit::TestCase
|
|||
@cursor = Cursor.new(@collection)
|
||||
end
|
||||
|
||||
should "set timeout" do
|
||||
assert_equal true, @cursor.timeout
|
||||
end
|
||||
|
||||
should "set selector" do
|
||||
assert @cursor.selector == {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue