From 3dfa56ccfbdcaeba74273ace80cb752e6b716f87 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 26 Jun 2005 11:25:32 +0000 Subject: 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 --- activerecord/test/migration_mysql.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'activerecord/test/migration_mysql.rb') 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 -- cgit v1.2.3