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:
parent
79b0861624
commit
0b608abeb8
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue