From 13a60b83a470fb90f91a073b0540f7b02aa11ebd Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Fri, 29 Feb 2008 23:16:53 +0000 Subject: Improve performance by avoiding named block arguments. Closes #11109 [adymo] Reapplies [8865] with some fixes git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8957 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/cases/associations/join_model_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activerecord/test/cases/associations') diff --git a/activerecord/test/cases/associations/join_model_test.rb b/activerecord/test/cases/associations/join_model_test.rb index e128d6dda3..c24a94bfc4 100644 --- a/activerecord/test/cases/associations/join_model_test.rb +++ b/activerecord/test/cases/associations/join_model_test.rb @@ -290,6 +290,11 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase assert_equal nil, authors(:david).categories.find_by_name('Technology') end + def test_has_many_array_methods_called_by_method_missing + assert true, authors(:david).categories.any? { |category| category.name == 'General' } + assert_nothing_raised { authors(:david).categories.sort } + end + def test_has_many_going_through_join_model_with_custom_foreign_key assert_equal [], posts(:thinking).authors assert_equal [authors(:mary)], posts(:authorless).authors -- cgit v1.2.3