From 452195af2c9c0502e73ca1ba48d7e6bda071c2ac Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 11 Jan 2012 13:49:10 -0800 Subject: use skip so we know what tests are being skipped --- activerecord/test/cases/migration_test.rb | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'activerecord/test') diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index 669989522d..fc26e9527d 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -874,19 +874,21 @@ class MigrationTest < ActiveRecord::TestCase assert_equal(0, ActiveRecord::Migrator.current_version) end - if ActiveRecord::Base.connection.supports_ddl_transactions? - def test_migrator_one_up_with_exception_and_rollback - assert !Person.column_methods_hash.include?(:last_name) - - e = assert_raise(StandardError) do - ActiveRecord::Migrator.up(MIGRATIONS_ROOT + "/broken", 100) - end + def test_migrator_one_up_with_exception_and_rollback + unless ActiveRecord::Base.connection.supports_ddl_transactions? + skip "not supported on #{ActiveRecord::Base.connection.class}" + end - assert_equal "An error has occurred, this and all later migrations canceled:\n\nSomething broke", e.message + assert !Person.column_methods_hash.include?(:last_name) - Person.reset_column_information - assert !Person.column_methods_hash.include?(:last_name) + e = assert_raise(StandardError) do + ActiveRecord::Migrator.up(MIGRATIONS_ROOT + "/broken", 100) end + + assert_equal "An error has occurred, this and all later migrations canceled:\n\nSomething broke", e.message + + Person.reset_column_information + assert !Person.column_methods_hash.include?(:last_name) end def test_finds_migrations -- cgit v1.2.3