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