require 'helper' class TestPostgresqlCursor < Test::Unit::TestCase def test_cursor c = Model.find_with_cursor(:conditions=>["id>?",0], :cursor=>{:buffer_size=>10}) mycount=0 count = c.each { |r| mycount += 1 } assert_equal mycount, count end def test_empty_set c = Model.find_with_cursor(:conditions=>["id["id= 10 end assert_equal cursor.count, 10 end end end