Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

test should clean up after themselves

  • Loading branch information...
commit d5dbc037c45ead4a4fbfa826ad537017af408c4b 1 parent 314e2cc
@tenderlove tenderlove authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  activerecord/test/cases/migration_test.rb
View
3  activerecord/test/cases/migration_test.rb
@@ -63,6 +63,7 @@ def teardown
def test_migrator_versions
migrations_path = MIGRATIONS_ROOT + "/valid"
+ old_path = ActiveRecord::Migrator.migrations_paths
ActiveRecord::Migrator.migrations_paths = migrations_path
ActiveRecord::Migrator.up(migrations_path)
@@ -74,6 +75,8 @@ def test_migrator_versions
assert_equal 0, ActiveRecord::Migrator.current_version
assert_equal 3, ActiveRecord::Migrator.last_version
assert_equal true, ActiveRecord::Migrator.needs_migration?
+ ensure
+ ActiveRecord::Migrator.migrations_paths = old_path
end
def test_create_table_with_force_true_does_not_drop_nonexisting_table
Please sign in to comment.
Something went wrong with that request. Please try again.