aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/migration_test.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index 50d8495f3d..4566aeb45b 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -587,7 +587,8 @@ class MigrationTest < ActiveRecord::TestCase
if current_adapter?(:Mysql2Adapter, :PostgreSQLAdapter)
def test_out_of_range_limit_should_raise
- Person.connection.drop_table :test_limits rescue nil
+ 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
@@ -603,8 +604,8 @@ class MigrationTest < ActiveRecord::TestCase
end
end
end
-
- Person.connection.drop_table :test_limits rescue nil
+ ensure
+ Person.connection.drop_table :test_integer_limits, if_exists: true
end
end