1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

preheat the table cache in arel

This commit is contained in:
Aaron Patterson 2011-01-14 11:16:31 -08:00
parent 3755ae04a1
commit 1e9685f159

View file

@ -7,6 +7,7 @@ class EachTest < ActiveRecord::TestCase
def setup
@posts = Post.order("id asc")
@total = Post.count
Post.count('id') # preheat arel's table cache
end
def test_each_should_excecute_one_query_per_batch