Skip to content

Commit

Permalink
Fix test on finding migrations from 2 paths
Browse files Browse the repository at this point in the history
Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information
drogus authored and josevalim committed Dec 9, 2010
1 parent 0027b65 commit 6f89582
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions activerecord/test/cases/migration_test.rb
Expand Up @@ -1279,11 +1279,13 @@ 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
[[20090101010101, "PeopleHaveHobbies"],
[20090101010202, "PeopleHaveDescriptions"],
[20100101010101, "ValidWithTimestampsPeopleHaveLastNames"],
[20100201010101, "ValidWithTimestampsWeNeedReminders"],
[20100301010101, "ValidWithTimestampsInnocentJointable"]].each_with_index do |pair, i|
assert_equal pair.first, migrations[i].version
assert_equal pair.last, migrations[i].name
end
end

Expand Down

0 comments on commit 6f89582

Please sign in to comment.