diff options
author | Evan Phoenix <ephoenix@engineyard.com> | 2010-03-22 09:53:07 -0700 |
---|---|---|
committer | Evan Phoenix <ephoenix@engineyard.com> | 2010-03-22 10:00:04 -0700 |
commit | 0b608abeb8fea251d4613458e23bf2b6d564ff60 (patch) | |
tree | 1d3f4f6fcfe332e99239d05ff69a5a74faa75cff /activerecord | |
parent | 79b08616244b31b7e63a46d9a6492bc7e67c2813 (diff) | |
download | rails-0b608abeb8fea251d4613458e23bf2b6d564ff60.tar.gz rails-0b608abeb8fea251d4613458e23bf2b6d564ff60.tar.bz2 rails-0b608abeb8fea251d4613458e23bf2b6d564ff60.zip |
Clear the query cache between tests that test the query cache
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/query_cache_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/query_cache_test.rb b/activerecord/test/cases/query_cache_test.rb index 3710f8e40b..91349689bc 100644 --- a/activerecord/test/cases/query_cache_test.rb +++ b/activerecord/test/cases/query_cache_test.rb @@ -10,6 +10,10 @@ require 'models/post' class QueryCacheTest < ActiveRecord::TestCase fixtures :tasks, :topics, :categories, :posts, :categories_posts + def setup + Task.connection.clear_query_cache + end + def test_find_queries assert_queries(2) { Task.find(1); Task.find(1) } end |