diff options
author | Guo Xiang Tan <tgx_world@hotmail.com> | 2014-03-13 21:35:58 -0700 |
---|---|---|
committer | Guo Xiang Tan <tgx_world@hotmail.com> | 2014-03-14 20:48:59 -0700 |
commit | 3baace687cfbf4c98367fda31e0a4b0f85ce813f (patch) | |
tree | ff8454c43247efefa83b2defb6e8ebc4e0872b96 /activerecord/test/cases/associations | |
parent | 3560d7aad7c9bffc903ec1378c1c1d7c738f5b86 (diff) | |
download | rails-3baace687cfbf4c98367fda31e0a4b0f85ce813f.tar.gz rails-3baace687cfbf4c98367fda31e0a4b0f85ce813f.tar.bz2 rails-3baace687cfbf4c98367fda31e0a4b0f85ce813f.zip |
Use teardown helper method.
Follow-Up to https://github.com/rails/rails/pull/14348
Ensure that SQLCounter.clear_log is called after each test.
This is a step to prevent side effects when running tests. This will allow us to run them in random order.
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r-- | activerecord/test/cases/associations/eager_load_nested_include_test.rb | 4 | ||||
-rw-r--r-- | activerecord/test/cases/associations/eager_singularization_test.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/associations/eager_load_nested_include_test.rb b/activerecord/test/cases/associations/eager_load_nested_include_test.rb index 5ff117eaa0..0ff87d53ea 100644 --- a/activerecord/test/cases/associations/eager_load_nested_include_test.rb +++ b/activerecord/test/cases/associations/eager_load_nested_include_test.rb @@ -68,7 +68,7 @@ class EagerLoadPolyAssocsTest < ActiveRecord::TestCase generate_test_object_graphs end - def teardown + teardown do [Circle, Square, Triangle, PaintColor, PaintTexture, ShapeExpression, NonPolyOne, NonPolyTwo].each do |c| c.delete_all @@ -111,7 +111,7 @@ class EagerLoadNestedIncludeWithMissingDataTest < ActiveRecord::TestCase @first_categorization = @davey_mcdave.categorizations.create(:category => Category.first, :post => @first_post) end - def teardown + teardown do @davey_mcdave.destroy @first_post.destroy @first_comment.destroy diff --git a/activerecord/test/cases/associations/eager_singularization_test.rb b/activerecord/test/cases/associations/eager_singularization_test.rb index b12bc355e8..a61a070331 100644 --- a/activerecord/test/cases/associations/eager_singularization_test.rb +++ b/activerecord/test/cases/associations/eager_singularization_test.rb @@ -90,7 +90,7 @@ class EagerSingularizationTest < ActiveRecord::TestCase end end - def teardown + teardown do connection.drop_table :viri connection.drop_table :octopi connection.drop_table :passes |