diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-09 15:12:48 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-09 15:12:48 -0800 |
commit | 3e7c351b486356757631de9a89ea775c9bed658f (patch) | |
tree | a1a4234e69889d692e81078e6754412a2c1e3a13 | |
parent | 0e8280b19322bd3fdd7e18fc6ba35d45e986e611 (diff) | |
download | rails-3e7c351b486356757631de9a89ea775c9bed658f.tar.gz rails-3e7c351b486356757631de9a89ea775c9bed658f.tar.bz2 rails-3e7c351b486356757631de9a89ea775c9bed658f.zip |
preheating cache so that tests can run in isolation
-rw-r--r-- | activerecord/test/cases/associations/eager_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb index ea86ac29d0..c96ca90750 100644 --- a/activerecord/test/cases/associations/eager_test.rb +++ b/activerecord/test/cases/associations/eager_test.rb @@ -24,6 +24,11 @@ class EagerAssociationTest < ActiveRecord::TestCase :owners, :pets, :author_favorites, :jobs, :references, :subscribers, :subscriptions, :books, :developers, :projects, :developers_projects + def setup + # preheat table existence caches + Comment.find_by_id(1) + end + def test_loading_with_one_association posts = Post.find(:all, :include => :comments) post = posts.find { |p| p.id == 1 } |