diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-02-11 11:19:08 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-02-11 11:21:00 +0100 |
commit | 3ffffcc39dec63e2c0e3c57a76c31649c781989e (patch) | |
tree | a96a1818627b9acbee34d789bf472d3c0e39743f /activerecord | |
parent | 174f5ed545b1a5aafbca83d70ca011d2fa0d4c78 (diff) | |
download | rails-3ffffcc39dec63e2c0e3c57a76c31649c781989e.tar.gz rails-3ffffcc39dec63e2c0e3c57a76c31649c781989e.tar.bz2 rails-3ffffcc39dec63e2c0e3c57a76c31649c781989e.zip |
prefer `drop_table :table, if_exists: true` over explicit checks.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/migration/references_foreign_key_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/migration/references_foreign_key_test.rb b/activerecord/test/cases/migration/references_foreign_key_test.rb index cf1328e4d0..17ac72a109 100644 --- a/activerecord/test/cases/migration/references_foreign_key_test.rb +++ b/activerecord/test/cases/migration/references_foreign_key_test.rb @@ -10,8 +10,8 @@ module ActiveRecord end teardown do - @connection.drop_table("testings") if @connection.table_exists? "testings" - @connection.drop_table("testing_parents") if @connection.table_exists? "testing_parents" + @connection.drop_table "testings", if_exists: true + @connection.drop_table "testing_parents", if_exists: true end test "foreign keys can be created with the table" do |