diff options
Diffstat (limited to 'activerecord/test/cases/migration')
-rw-r--r-- | activerecord/test/cases/migration/foreign_key_test.rb | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/activerecord/test/cases/migration/foreign_key_test.rb b/activerecord/test/cases/migration/foreign_key_test.rb index da82f62406..ba21923d79 100644 --- a/activerecord/test/cases/migration/foreign_key_test.rb +++ b/activerecord/test/cases/migration/foreign_key_test.rb @@ -20,7 +20,9 @@ if ActiveRecord::Base.connection.supports_foreign_keys? end end - module ForeignKeyChangeColumnSharedTest + class ForeignKeyChangeColumnTest < ActiveRecord::TestCase + self.use_transactional_tests = false + class Rocket < ActiveRecord::Base has_many :astronauts end @@ -141,17 +143,7 @@ if ActiveRecord::Base.connection.supports_foreign_keys? end end - class ForeignKeyChangeColumnTest < ActiveRecord::TestCase - include ForeignKeyChangeColumnSharedTest - - self.use_transactional_tests = false - end - - class ForeignKeyChangeColumnWithPrefixTest < ActiveRecord::TestCase - include ForeignKeyChangeColumnSharedTest - - self.use_transactional_tests = false - + class ForeignKeyChangeColumnWithPrefixTest < ForeignKeyChangeColumnTest setup do ActiveRecord::Base.table_name_prefix = "p_" end @@ -161,11 +153,7 @@ if ActiveRecord::Base.connection.supports_foreign_keys? end end - class ForeignKeyChangeColumnWithSuffixTest < ActiveRecord::TestCase - include ForeignKeyChangeColumnSharedTest - - self.use_transactional_tests = false - + class ForeignKeyChangeColumnWithSuffixTest < ForeignKeyChangeColumnTest setup do ActiveRecord::Base.table_name_suffix = "_p" end |