From 8ee346ad43c083e5fb5d795d1f1cefc29391bb11 Mon Sep 17 00:00:00 2001 From: Rolf Timmermans Date: Sun, 27 Jun 2010 14:06:37 +0200 Subject: [PATCH] Added failing test for caching of column information for has_many associations with :include. --- .../associations/has_many_associations_test.rb | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index 45c7498..9069cce 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -1183,4 +1183,10 @@ class HasManyAssociationsTest < ActiveRecord::TestCase end EOF end + + def test_calculations_on_has_many_association_should_not_reload_column_definitions + Author.last.posts_with_comments.count + Author.connection.expects(:columns).never + Author.last.posts_with_comments.count + end end -- 1.7.0.6