aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration_test.rb
diff options
context:
space:
mode:
authorGuo Xiang Tan <tgx_world@hotmail.com>2014-03-13 21:35:58 -0700
committerGuo Xiang Tan <tgx_world@hotmail.com>2014-03-14 20:48:59 -0700
commit3baace687cfbf4c98367fda31e0a4b0f85ce813f (patch)
treeff8454c43247efefa83b2defb6e8ebc4e0872b96 /activerecord/test/cases/migration_test.rb
parent3560d7aad7c9bffc903ec1378c1c1d7c738f5b86 (diff)
downloadrails-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/migration_test.rb')
-rw-r--r--activerecord/test/cases/migration_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index 1bda472d23..455ec78f68 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -33,7 +33,7 @@ class MigrationTest < ActiveRecord::TestCase
ActiveRecord::Base.connection.schema_cache.clear!
end
- def teardown
+ teardown do
ActiveRecord::Base.table_name_prefix = ""
ActiveRecord::Base.table_name_suffix = ""
@@ -585,7 +585,7 @@ if ActiveRecord::Base.connection.supports_bulk_alter?
Person.reset_sequence_name
end
- def teardown
+ teardown do
Person.connection.drop_table(:delete_me) rescue nil
end