diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-16 15:23:16 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-16 15:23:16 -0800 |
commit | 86a73cd8492380eebaa6844dd3ba9924460a0e67 (patch) | |
tree | 8e87788201faf0e9ece4a7e1fbba0678fc5f39be /activerecord/test | |
parent | b731593e1a01327a1ed7b19094eca3cf618a495d (diff) | |
download | rails-86a73cd8492380eebaa6844dd3ba9924460a0e67.tar.gz rails-86a73cd8492380eebaa6844dd3ba9924460a0e67.tar.bz2 rails-86a73cd8492380eebaa6844dd3ba9924460a0e67.zip |
stop ddl modifications for another test
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 12 | ||||
-rw-r--r-- | activerecord/test/cases/migrator_test.rb | 10 |
2 files changed, 10 insertions, 12 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index d9c42ea06c..99a4962237 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -233,18 +233,6 @@ class MigrationTest < ActiveRecord::TestCase refute Person.column_methods_hash.include?(:last_name) end - def test_only_loads_pending_migrations - # migrate up to 1 - ActiveRecord::SchemaMigration.create!(:version => '1') - - proxies = ActiveRecord::Migrator.migrate(MIGRATIONS_ROOT + "/valid", nil) - - names = proxies.map(&:name) - assert !names.include?('ValidPeopleHaveLastNames') - assert names.include?('WeNeedReminders') - assert names.include?('InnocentJointable') - end - def test_get_all_versions ActiveRecord::Migrator.migrate(MIGRATIONS_ROOT + "/valid") assert_equal([1,2,3], ActiveRecord::Migrator.get_all_versions) diff --git a/activerecord/test/cases/migrator_test.rb b/activerecord/test/cases/migrator_test.rb index 5dbde68cb2..5adabffbd5 100644 --- a/activerecord/test/cases/migrator_test.rb +++ b/activerecord/test/cases/migrator_test.rb @@ -318,6 +318,16 @@ module ActiveRecord assert_equal(3, ActiveRecord::Migrator.current_version) end + def test_only_loads_pending_migrations + # migrate up to 1 + ActiveRecord::SchemaMigration.create!(:version => '1') + + calls, migrator = migrator_class(3) + migrator.migrate("valid", nil) + + assert_equal [[:up, 2], [:up, 3]], calls + end + private def m(name, version, &block) x = Sensor.new name, version |