diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index 5a83748292..4ad0e59a05 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -587,6 +587,8 @@ class MigrationTest < ActiveRecord::TestCase if current_adapter?(:Mysql2Adapter, :PostgreSQLAdapter) def test_out_of_range_limit_should_raise + Person.connection.drop_table :test_integer_limits, if_exists: true + e = assert_raise(ActiveRecord::ActiveRecordError, "integer limit didn't raise") do Person.connection.create_table :test_integer_limits, :force => true do |t| t.column :bigone, :integer, :limit => 10 @@ -602,6 +604,8 @@ class MigrationTest < ActiveRecord::TestCase end end end + ensure + Person.connection.drop_table :test_integer_limits, if_exists: true end end