aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migrator_test.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-01-13 10:30:52 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-01-13 14:33:58 -0800
commitff5c385620c74f265e31e284e199fe29764622c6 (patch)
tree2dad6dea091ed65b7da6b27d0d9c67fb4ef17dc9 /activerecord/test/cases/migrator_test.rb
parent85e5fac959cc8345abf8690d1ba4ea11f6bc5732 (diff)
downloadrails-ff5c385620c74f265e31e284e199fe29764622c6.tar.gz
rails-ff5c385620c74f265e31e284e199fe29764622c6.tar.bz2
rails-ff5c385620c74f265e31e284e199fe29764622c6.zip
move another migrator test, use schema migration model
Diffstat (limited to 'activerecord/test/cases/migrator_test.rb')
-rw-r--r--activerecord/test/cases/migrator_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/cases/migrator_test.rb b/activerecord/test/cases/migrator_test.rb
index 45d070d86e..d938eca575 100644
--- a/activerecord/test/cases/migrator_test.rb
+++ b/activerecord/test/cases/migrator_test.rb
@@ -71,5 +71,14 @@ module ActiveRecord
}
assert migration_proxy, 'should find pending migration'
end
+
+ def test_finds_pending_migrations
+ ActiveRecord::SchemaMigration.create!(:version => '1')
+ migration_list = [ Migration.new('foo', 1), Migration.new('bar', 3) ]
+ migrations = ActiveRecord::Migrator.new(:up, migration_list).pending_migrations
+
+ assert_equal 1, migrations.size
+ assert_equal migration_list.last, migrations.first
+ end
end
end