diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-11-15 14:36:15 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-11-15 14:36:15 -0800 |
commit | d5dbc037c45ead4a4fbfa826ad537017af408c4b (patch) | |
tree | 47557a9d3e2de063f3993f8ac0261367d6ccb91c /activerecord/test/cases | |
parent | 314e2cc05b6cad93b6e8a3414b2c0106174239be (diff) | |
download | rails-d5dbc037c45ead4a4fbfa826ad537017af408c4b.tar.gz rails-d5dbc037c45ead4a4fbfa826ad537017af408c4b.tar.bz2 rails-d5dbc037c45ead4a4fbfa826ad537017af408c4b.zip |
test should clean up after themselves
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index f74e903348..7c3988859f 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -63,6 +63,7 @@ class MigrationTest < ActiveRecord::TestCase 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 @@ class MigrationTest < ActiveRecord::TestCase 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 |