From 0b608abeb8fea251d4613458e23bf2b6d564ff60 Mon Sep 17 00:00:00 2001 From: Evan Phoenix Date: Mon, 22 Mar 2010 09:53:07 -0700 Subject: [PATCH] Clear the query cache between tests that test the query cache --- activerecord/test/cases/query_cache_test.rb | 4 ++++ 1 file changed, 4 insertions(+) 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