Permalink
Browse files

Clear the query cache between tests that test the query cache

  • Loading branch information...
Evan Phoenix
Evan Phoenix committed Mar 22, 2010
1 parent 79b0861 commit 0b608abeb8fea251d4613458e23bf2b6d564ff60
Showing with 4 additions and 0 deletions.
  1. +4 −0 activerecord/test/cases/query_cache_test.rb
@@ -10,6 +10,10 @@
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

0 comments on commit 0b608ab

Please sign in to comment.