Permalink
Browse files

Fixed broken migrations tests: added assert_equal. [#1704 state:resol…

…ved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
marcenuc authored and lifo committed Jan 7, 2009
1 parent 20d3892 commit dfcf1e4cf6128ae67f9cab291fd6c08081aa5d80
Showing with 7 additions and 7 deletions.
  1. +7 −7 activerecord/test/cases/migration_test.rb
@@ -945,20 +945,20 @@ def test_migrator_one_up_with_exception_and_rollback
def test_finds_migrations
migrations = ActiveRecord::Migrator.new(:up, MIGRATIONS_ROOT + "/valid").migrations
- [['1', 'people_have_last_names'],
- ['2', 'we_need_reminders'],
- ['3', 'innocent_jointable']].each_with_index do |pair, i|
- migrations[i].version == pair.first
- migrations[1].name == pair.last
+
+ [[1, 'PeopleHaveLastNames'], [2, 'WeNeedReminders'], [3, '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
+
assert_equal 1, migrations.size
- migrations[0].version == '3'
- migrations[0].name == 'innocent_jointable'
+ assert_equal migrations[0].version, 3
+ assert_equal migrations[0].name, 'InnocentJointable'
end
def test_only_loads_pending_migrations

0 comments on commit dfcf1e4

Please sign in to comment.