From 75f03eca753f1e835409a80db1f54f716ef48d18 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Thu, 26 Apr 2012 18:32:55 +0100 Subject: remove calls to find(:first), find(:last) and find(:all) --- activerecord/test/cases/associations/eager_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/test/cases/associations/eager_test.rb') diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb index c3eda9431c..95ae158c93 100644 --- a/activerecord/test/cases/associations/eager_test.rb +++ b/activerecord/test/cases/associations/eager_test.rb @@ -585,7 +585,7 @@ class EagerAssociationTest < ActiveRecord::TestCase end def test_eager_with_has_many_and_limit_with_no_results - posts = Post.scoped(:includes => [ :author, :comments ], :limit => 2, :where => "posts.title = 'magic forest'").find(:all) + posts = Post.scoped(:includes => [ :author, :comments ], :limit => 2, :where => "posts.title = 'magic forest'").all assert_equal 0, posts.size end @@ -1036,7 +1036,7 @@ class EagerAssociationTest < ActiveRecord::TestCase end def test_preload_has_many_using_primary_key - expected = Firm.find(:first).clients_using_primary_key.to_a + expected = Firm.first.clients_using_primary_key.to_a firm = Firm.find :first, :include => :clients_using_primary_key assert_no_queries do assert_equal expected, firm.clients_using_primary_key -- cgit v1.2.3