aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-01-04 16:18:38 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-01-04 16:18:38 -0800
commit39489d138f3e1bf9119d2831f4a71763ad8cadff (patch)
treeae306c38cb408d5321d4a472a4a005086d3d6a8f /activerecord/test
parent1b276d53fb15a42025d5eeaca1bcd1b837a5dc53 (diff)
downloadrails-39489d138f3e1bf9119d2831f4a71763ad8cadff.tar.gz
rails-39489d138f3e1bf9119d2831f4a71763ad8cadff.tar.bz2
rails-39489d138f3e1bf9119d2831f4a71763ad8cadff.zip
clear the sql counter on teardown so the GC can do it's thing
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/active_record/test_case.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/active_record/test_case.rb b/activerecord/test/active_record/test_case.rb
index 5398a14fc6..2f18eba157 100644
--- a/activerecord/test/active_record/test_case.rb
+++ b/activerecord/test/active_record/test_case.rb
@@ -9,6 +9,10 @@ module ActiveRecord
cleanup_identity_map
end
+ def teardown
+ ActiveRecord::SQLCounter.log.clear
+ end
+
def cleanup_identity_map
ActiveRecord::IdentityMap.clear
end