1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Clear the query cache between tests that test the query cache

This commit is contained in:
Evan Phoenix 2010-03-22 09:53:07 -07:00
parent 79b0861624
commit 0b608abeb8

View file

@ -10,6 +10,10 @@ require 'models/post'
class QueryCacheTest < ActiveRecord::TestCase class QueryCacheTest < ActiveRecord::TestCase
fixtures :tasks, :topics, :categories, :posts, :categories_posts fixtures :tasks, :topics, :categories, :posts, :categories_posts
def setup
Task.connection.clear_query_cache
end
def test_find_queries def test_find_queries
assert_queries(2) { Task.find(1); Task.find(1) } assert_queries(2) { Task.find(1); Task.find(1) }
end end