From c74045cf0771ab51dfeca94b30c447cab6193e60 Mon Sep 17 00:00:00 2001 From: Brian Christian Date: Tue, 9 Feb 2016 16:02:08 -0800 Subject: allow Array.penultimate and Array.antepenultiate access methods --- .../test/cases/associations/has_many_associations_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'activerecord/test') diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index ecaa521283..4e9f7c330a 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -407,6 +407,16 @@ class HasManyAssociationsTest < ActiveRecord::TestCase bulbs.forty_two({}) end + assert_no_queries do + bulbs.antepenultimate() + bulbs.antepenultimate({}) + end + + assert_no_queries do + bulbs.penultimate() + bulbs.penultimate({}) + end + assert_no_queries do bulbs.last() bulbs.last({}) -- cgit v1.2.3