aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-01-14 11:16:31 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-01-14 11:16:31 -0800
commit1e9685f15921d1acec65d07a27640aa1c674a29b (patch)
tree40bea5aab21c1d29b5e8bcb3991b38c0ef01c48b /activerecord/test
parent3755ae04a1933762fce99d148734dc3de2a184c1 (diff)
downloadrails-1e9685f15921d1acec65d07a27640aa1c674a29b.tar.gz
rails-1e9685f15921d1acec65d07a27640aa1c674a29b.tar.bz2
rails-1e9685f15921d1acec65d07a27640aa1c674a29b.zip
preheat the table cache in arel
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/batches_test.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/cases/batches_test.rb b/activerecord/test/cases/batches_test.rb
index dcc49e12ca..6f65fb96d1 100644
--- a/activerecord/test/cases/batches_test.rb
+++ b/activerecord/test/cases/batches_test.rb
@@ -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