aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-12-09 16:09:47 +0100
committerJosé Valim <jose.valim@gmail.com>2010-12-09 16:09:51 +0100
commitcc48192248f107c61294f72459fd027d45403ba5 (patch)
treec52148424f4cdbd07f1c244603aa1bffe3b30a62 /activerecord/test
parentd3f7e565d1a6ee15605971c3f3fea6e756a1ff99 (diff)
parent7b9f634e15bfc3f92f4ac7e18537443a55306c10 (diff)
downloadrails-cc48192248f107c61294f72459fd027d45403ba5.tar.gz
rails-cc48192248f107c61294f72459fd027d45403ba5.tar.bz2
rails-cc48192248f107c61294f72459fd027d45403ba5.zip
Merge remote branch 'drogus/dummy_tasks'
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/migration_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index 96da3be655..95b7ce9f34 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -1275,6 +1275,18 @@ if ActiveRecord::Base.connection.supports_migrations?
end
end
+ def test_finds_migrations_from_two_directories
+ directories = [MIGRATIONS_ROOT + '/valid_with_timestamps', MIGRATIONS_ROOT + '/to_copy_with_timestamps']
+ migrations = ActiveRecord::Migrator.new(:up, directories).migrations
+
+ [[20090101010101, "PeopleHaveHobbies"], [20090101010202, "PeopleHaveDescriptions"],
+ [20100101010101, "PeopleHaveLastNames"], [20100201010101, "WeNeedReminders"],
+ [20100301010101, "InnocentJointable"]].each_with_index do |pair, i|
+ assert_equal migrations[i].version, pair.first
+ assert_equal migrations[i].name, pair.last
+ end
+ end
+
def test_finds_pending_migrations
ActiveRecord::Migrator.up(MIGRATIONS_ROOT + "/interleaved/pass_2", 1)
migrations = ActiveRecord::Migrator.new(:up, MIGRATIONS_ROOT + "/interleaved/pass_2").pending_migrations