aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/migration_mysql.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-06-26 11:25:32 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-06-26 11:25:32 +0000
commit3dfa56ccfbdcaeba74273ace80cb752e6b716f87 (patch)
tree7d7dc552165c0626a07c1d1d723344381703b1c5 /activerecord/test/migration_mysql.rb
parentee4c834ed2339eaff5dc888e2148a15b9cdbd615 (diff)
downloadrails-3dfa56ccfbdcaeba74273ace80cb752e6b716f87.tar.gz
rails-3dfa56ccfbdcaeba74273ace80cb752e6b716f87.tar.bz2
rails-3dfa56ccfbdcaeba74273ace80cb752e6b716f87.zip
Updated all references to the old find_first and find_all to use the new style #1511 [Marcel Molina]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1520 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/migration_mysql.rb')
-rw-r--r--activerecord/test/migration_mysql.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/test/migration_mysql.rb b/activerecord/test/migration_mysql.rb
index 7777bb2c03..6761d76ca1 100644
--- a/activerecord/test/migration_mysql.rb
+++ b/activerecord/test/migration_mysql.rb
@@ -40,10 +40,10 @@ class MigrationTest < Test::Unit::TestCase
WeNeedReminders.up
assert Reminder.create("content" => "hello world", "remind_at" => Time.now)
- assert "hello world", Reminder.find_first
+ assert "hello world", Reminder.find(:first)
WeNeedReminders.down
- assert_raises(ActiveRecord::StatementInvalid) { Reminder.find_first }
+ assert_raises(ActiveRecord::StatementInvalid) { Reminder.find(:first) }
end
def test_migrator
@@ -56,7 +56,7 @@ class MigrationTest < Test::Unit::TestCase
Person.reset_column_information
assert Person.column_methods_hash.include?(:last_name)
assert Reminder.create("content" => "hello world", "remind_at" => Time.now)
- assert "hello world", Reminder.find_first
+ assert "hello world", Reminder.find(:first)
ActiveRecord::Migrator.down(File.dirname(__FILE__) + '/fixtures/migrations/')
@@ -64,7 +64,7 @@ class MigrationTest < Test::Unit::TestCase
assert_equal 0, ActiveRecord::Migrator.current_version
Person.reset_column_information
assert !Person.column_methods_hash.include?(:last_name)
- assert_raises(ActiveRecord::StatementInvalid) { Reminder.find_first }
+ assert_raises(ActiveRecord::StatementInvalid) { Reminder.find(:first) }
end
def test_migrator_one_up
@@ -81,7 +81,7 @@ class MigrationTest < Test::Unit::TestCase
ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/fixtures/migrations/', 2)
assert Reminder.create("content" => "hello world", "remind_at" => Time.now)
- assert "hello world", Reminder.find_first
+ assert "hello world", Reminder.find(:first)
end
def test_migrator_one_down
@@ -101,4 +101,4 @@ class MigrationTest < Test::Unit::TestCase
assert !Person.column_methods_hash.include?(:last_name)
assert_raises(ActiveRecord::StatementInvalid) { Reminder.column_methods_hash }
end
-end \ No newline at end of file
+end