Skip to content
Browse files

use skip so we know what tests are being skipped

  • Loading branch information...
1 parent cc88ffe commit 452195af2c9c0502e73ca1ba48d7e6bda071c2ac @tenderlove tenderlove committed Jan 11, 2012
Showing with 12 additions and 10 deletions.
  1. +12 −10 activerecord/test/cases/migration_test.rb
View
22 activerecord/test/cases/migration_test.rb
@@ -874,19 +874,21 @@ def test_migrator_double_down
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

0 comments on commit 452195a

Please sign in to comment.
Something went wrong with that request. Please try again.