From 401922ca63da78e4d503ddc9a8e2831a5ef6b2b8 Mon Sep 17 00:00:00 2001 From: Mike Dirolf Date: Wed, 11 Mar 2009 13:42:19 -0400 Subject: [PATCH] check count after as well --- tests/test_cursor.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_cursor.rb b/tests/test_cursor.rb index a2594bd..7590efe 100644 --- a/tests/test_cursor.rb +++ b/tests/test_cursor.rb @@ -46,19 +46,19 @@ class CursorTest < Test::Unit::TestCase } assert_equal 1001, @@coll.count - count = 0 @@coll.find.each { |obj| count += obj['a'] } + assert_equal 1001, @@coll.count # do the same thing again for debugging assert_equal 1001, @@coll.count - count2 = 0 @@coll.find.each { |obj| count2 += obj['a'] } + assert_equal 1001, @@coll.count assert_equal count, count2 assert_equal 499501, count @@ -74,19 +74,19 @@ class CursorTest < Test::Unit::TestCase } assert_equal 1001, coll.count - count = 0 coll.find.each { |obj| count += obj['a'] } + assert_equal 1001, coll.count # do the same thing again for debugging assert_equal 1001, coll.count - count2 = 0 coll.find.each { |obj| count2 += obj['a'] } + assert_equal 1001, coll.count assert_equal count, count2 assert_equal 499501, count