diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-06-10 11:50:37 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-06-26 22:03:48 +0200 |
commit | 1c170fdea2be04691c7daa8266084766fe963fff (patch) | |
tree | b0735d6f12d2f8b744f9eb6cac664c388a9d4d50 /activerecord/test/cases/migration | |
parent | 74b2fe4c0febe051cb48c7c25a565333ddf22bce (diff) | |
download | rails-1c170fdea2be04691c7daa8266084766fe963fff.tar.gz rails-1c170fdea2be04691c7daa8266084766fe963fff.tar.bz2 rails-1c170fdea2be04691c7daa8266084766fe963fff.zip |
fk: generalize using `AlterTable` and `SchemaCreation`.
Diffstat (limited to 'activerecord/test/cases/migration')
-rw-r--r-- | activerecord/test/cases/migration/foreign_key_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/test/cases/migration/foreign_key_test.rb b/activerecord/test/cases/migration/foreign_key_test.rb index 655393445d..6ad595668f 100644 --- a/activerecord/test/cases/migration/foreign_key_test.rb +++ b/activerecord/test/cases/migration/foreign_key_test.rb @@ -23,8 +23,10 @@ module ActiveRecord end teardown do - @connection.execute "DROP TABLE IF EXISTS astronauts" - @connection.execute "DROP TABLE IF EXISTS rockets" + if defined?(@connection) + @connection.execute "DROP TABLE IF EXISTS astronauts" + @connection.execute "DROP TABLE IF EXISTS rockets" + end end def test_foreign_keys |