From b7bcc7e1905062f330e0a84b93a1ecacfea2a4c0 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Mon, 24 Jan 2011 22:25:32 +0000 Subject: DRY up first/last and hence make last benefit from the bugfix in first --- activerecord/test/cases/associations/has_many_associations_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index 2ca412d424..3bec9c97f4 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -86,10 +86,16 @@ class HasManyAssociationsTest < ActiveRecord::TestCase Car.create(:name => 'honda') bulbs = Car.first.bulbs bulbs.inspect # to load all instances of bulbs + assert_no_queries do bulbs.first() bulbs.first({}) end + + assert_no_queries do + bulbs.last() + bulbs.last({}) + end end def test_create_resets_cached_counters -- cgit v1.2.3