From 3b017856f72ac6711bfbbce2d6edd9c8b49923c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 23 Feb 2016 12:21:53 -0300 Subject: Make sure we don't change the global state in the tests We are creating the table but not deleting after the test. --- activerecord/test/cases/migration_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord') 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 -- cgit v1.2.3