aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcello Nuccio <marcello.nuccio@gmail.com>2009-01-07 01:37:56 +0100
committerPratik Naik <pratiknaik@gmail.com>2009-03-07 11:00:24 +0000
commitdfcf1e4cf6128ae67f9cab291fd6c08081aa5d80 (patch)
tree8b44ddff3b2609c74929f60cea60aed2dd65c3c5
parent20d3892f46c553e8ca3d4e8d223a3bd92789556d (diff)
downloadrails-dfcf1e4cf6128ae67f9cab291fd6c08081aa5d80.tar.gz
rails-dfcf1e4cf6128ae67f9cab291fd6c08081aa5d80.tar.bz2
rails-dfcf1e4cf6128ae67f9cab291fd6c08081aa5d80.zip
Fixed broken migrations tests: added assert_equal. [#1704 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
-rw-r--r--activerecord/test/cases/migration_test.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index 1c974e4825..710634f08a 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -945,20 +945,20 @@ if ActiveRecord::Base.connection.supports_migrations?
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