diff options
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/invertible_migration_test.rb | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/activerecord/test/cases/invertible_migration_test.rb b/activerecord/test/cases/invertible_migration_test.rb index acba4a134e..3ae7b63dff 100644 --- a/activerecord/test/cases/invertible_migration_test.rb +++ b/activerecord/test/cases/invertible_migration_test.rb @@ -54,13 +54,13 @@ module ActiveRecord end end - def test_up + def test_migrate_up migration = InvertibleMigration.new migration.migrate(:up) assert migration.connection.table_exists?("horses"), "horses should exist" end - def test_down + def test_migrate_down migration = InvertibleMigration.new migration.migrate :up migration.migrate :down @@ -77,5 +77,16 @@ module ActiveRecord LegacyMigration.migrate :down assert !ActiveRecord::Base.connection.table_exists?("horses"), "horses should not exist" end + + def test_up + LegacyMigration.up + assert ActiveRecord::Base.connection.table_exists?("horses"), "horses should exist" + end + + def test_down + LegacyMigration.up + LegacyMigration.down + assert !ActiveRecord::Base.connection.table_exists?("horses"), "horses should not exist" + end end end |