Skip to content

Commit

Permalink
move another migrator test to the correct class
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Jan 13, 2012
1 parent f3f8f0e commit ad2af42
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
11 changes: 0 additions & 11 deletions activerecord/test/cases/migration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -329,17 +329,6 @@ def test_finds_pending_migrations
assert_equal migrations[0].name, 'InterleavedInnocentJointable'
end

def test_relative_migrations
list = Dir.chdir(MIGRATIONS_ROOT) do
ActiveRecord::Migrator.up("valid/", 1)
end

migration_proxy = list.find { |item|
item.name == 'ValidPeopleHaveLastNames'
}
assert migration_proxy, 'should find pending migration'
end

def test_only_loads_pending_migrations
# migrate up to 1
ActiveRecord::Migrator.up(MIGRATIONS_ROOT + "/valid", 1)
Expand Down
11 changes: 11 additions & 0 deletions activerecord/test/cases/migrator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,16 @@ def test_deprecated_constructor
ActiveRecord::Migrator.new(:up, MIGRATIONS_ROOT + "/interleaved/pass_2")
end
end

def test_relative_migrations
list = Dir.chdir(MIGRATIONS_ROOT) do
ActiveRecord::Migrator.migrations("valid/")
end

migration_proxy = list.find { |item|
item.name == 'ValidPeopleHaveLastNames'
}
assert migration_proxy, 'should find pending migration'
end
end
end

0 comments on commit ad2af42

Please sign in to comment.