RUBY-249 Alias Cursor#next for Cursor#next_document
This commit is contained in:
parent
2690520afa
commit
8df0ff23f5
@ -88,6 +88,7 @@ module Mongo
|
||||
|
||||
doc
|
||||
end
|
||||
alias :next :next_document
|
||||
|
||||
# Reset this cursor on the server. Cursor options, such as the
|
||||
# query string and the values for skip and limit, are preserved.
|
||||
|
@ -395,10 +395,13 @@ class CursorTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
cursor = @@coll.find
|
||||
n = 0
|
||||
while cursor.has_next?
|
||||
assert cursor.next_document
|
||||
assert cursor.next
|
||||
n += 1
|
||||
end
|
||||
|
||||
assert_equal n, 200
|
||||
assert_equal false, cursor.has_next?
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user