diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-09-10 16:06:05 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-09-10 16:06:05 -0300 |
commit | 44ed7a8e5cbf272ceada2b52e452b4b467544bb9 (patch) | |
tree | d45ed31f0e23d570137388c7ad0954d54041ba8f | |
parent | a8eb6018318f65e34486da8d1860b3f0d774383d (diff) | |
parent | cb8b4167641484a9f7fe5757c872216e945bb1fb (diff) | |
download | rails-44ed7a8e5cbf272ceada2b52e452b4b467544bb9.tar.gz rails-44ed7a8e5cbf272ceada2b52e452b4b467544bb9.tar.bz2 rails-44ed7a8e5cbf272ceada2b52e452b4b467544bb9.zip |
Merge pull request #16867 from yahonda/use_drop_table_to_drop_sequences
Replace drop sql statement to drop_table method
-rw-r--r-- | activerecord/test/cases/associations/required_test.rb | 4 | ||||
-rw-r--r-- | activerecord/test/cases/attribute_decorators_test.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/migration/foreign_key_test.rb | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/cases/associations/required_test.rb b/activerecord/test/cases/associations/required_test.rb index 24a332bb4a..321fb6c8dd 100644 --- a/activerecord/test/cases/associations/required_test.rb +++ b/activerecord/test/cases/associations/required_test.rb @@ -18,8 +18,8 @@ class RequiredAssociationsTest < ActiveRecord::TestCase end teardown do - @connection.execute("DROP TABLE parents") if @connection.table_exists? 'parents' - @connection.execute("DROP TABLE children") if @connection.table_exists? 'children' + @connection.drop_table 'parents' if @connection.table_exists? 'parents' + @connection.drop_table 'children' if @connection.table_exists? 'children' end test "belongs_to associations are not required by default" do diff --git a/activerecord/test/cases/attribute_decorators_test.rb b/activerecord/test/cases/attribute_decorators_test.rb index 644876752e..53bd58e22e 100644 --- a/activerecord/test/cases/attribute_decorators_test.rb +++ b/activerecord/test/cases/attribute_decorators_test.rb @@ -28,7 +28,7 @@ module ActiveRecord teardown do return unless @connection - @connection.execute 'DROP TABLE attribute_decorators_model' if @connection.table_exists? 'attribute_decorators_model' + @connection.drop_table 'attribute_decorators_model' if @connection.table_exists? 'attribute_decorators_model' Model.attribute_type_decorations.clear Model.reset_column_information end diff --git a/activerecord/test/cases/migration/foreign_key_test.rb b/activerecord/test/cases/migration/foreign_key_test.rb index ba28d55e4c..406dd70c37 100644 --- a/activerecord/test/cases/migration/foreign_key_test.rb +++ b/activerecord/test/cases/migration/foreign_key_test.rb @@ -29,8 +29,8 @@ module ActiveRecord teardown do if defined?(@connection) - @connection.execute "DROP TABLE astronauts" if @connection.table_exists? 'astronauts' - @connection.execute "DROP TABLE rockets" if @connection.table_exists? 'rockets' + @connection.drop_table "astronauts" if @connection.table_exists? 'astronauts' + @connection.drop_table "rockets" if @connection.table_exists? 'rockets' end end |