aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration_test.rb
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2012-06-05 19:15:16 -0500
committerschneems <richard.schneeman@gmail.com>2012-06-09 13:30:23 -0500
commit96f19f6cf62fb4705a75cf4a81e4e2f145a4cee2 (patch)
treeaf7122bcb460a3412d3a034b7efb8d45aa9b51dd /activerecord/test/cases/migration_test.rb
parente5b39862cb4f8f3097cc8ab2dc606ddb1bd1febb (diff)
downloadrails-96f19f6cf62fb4705a75cf4a81e4e2f145a4cee2.tar.gz
rails-96f19f6cf62fb4705a75cf4a81e4e2f145a4cee2.tar.bz2
rails-96f19f6cf62fb4705a75cf4a81e4e2f145a4cee2.zip
raise error for pending migration
can be configured by setting config.active_record.migration. Setting to :page_load will raise an error on each page refresh if there are migrations that are pending. Setting to :page_load is defaulted in development for new applications.
Diffstat (limited to 'activerecord/test/cases/migration_test.rb')
-rw-r--r--activerecord/test/cases/migration_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index 45c847bae8..33d146dac3 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -63,12 +63,12 @@ class MigrationTest < ActiveRecord::TestCase
ActiveRecord::Migrator.up(migrations_path)
assert_equal 3, ActiveRecord::Migrator.current_version
assert_equal 3, ActiveRecord::Migrator.last_version
- assert_equal false, ActiveRecord::Migrator.needs_migration?
+ assert_equal false, ActiveRecord::Migrator.needs_migrations?
ActiveRecord::Migrator.down(MIGRATIONS_ROOT + "/valid")
assert_equal 0, ActiveRecord::Migrator.current_version
assert_equal 3, ActiveRecord::Migrator.last_version
- assert_equal true, ActiveRecord::Migrator.needs_migration?
+ assert_equal true, ActiveRecord::Migrator.needs_migrations?
end
def test_create_table_with_force_true_does_not_drop_nonexisting_table