aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/modules_test.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/modules_test.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/modules_test.rb')
-rw-r--r--activerecord/test/modules_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/modules_test.rb b/activerecord/test/modules_test.rb
index f13d140b6d..d34afbb8f8 100644
--- a/activerecord/test/modules_test.rb
+++ b/activerecord/test/modules_test.rb
@@ -5,14 +5,14 @@ class ModulesTest < Test::Unit::TestCase
fixtures :accounts, :companies, :projects, :developers
def test_module_spanning_associations
- assert MyApplication::Business::Firm.find_first.has_clients?, "Firm should have clients"
- firm = MyApplication::Business::Firm.find_first
+ assert MyApplication::Business::Firm.find(:first).has_clients?, "Firm should have clients"
+ firm = MyApplication::Business::Firm.find(:first)
assert_nil firm.class.table_name.match('::'), "Firm shouldn't have the module appear in its table name"
assert_equal 2, firm.clients_count, "Firm should have two clients"
end
def test_module_spanning_has_and_belongs_to_many_associations
- project = MyApplication::Business::Project.find_first
+ project = MyApplication::Business::Project.find(:first)
project.developers << MyApplication::Business::Developer.create("name" => "John")
assert "John", project.developers.last.name
end