aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations_test.rb
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2014-09-20 09:03:03 -0700
committerBen Woosley <ben.woosley@gmail.com>2014-09-28 16:17:06 -0700
commit9d569585a20ddd9ddb3602921f2ccffc208998d8 (patch)
tree97f5ee9a38a958f3bf60c1f1f972b8549f9cedb5 /activerecord/test/cases/associations_test.rb
parent482e80e84440136763b47c0fba2ed65a7823f022 (diff)
downloadrails-9d569585a20ddd9ddb3602921f2ccffc208998d8.tar.gz
rails-9d569585a20ddd9ddb3602921f2ccffc208998d8.tar.bz2
rails-9d569585a20ddd9ddb3602921f2ccffc208998d8.zip
Isolate access to @associations_cache and @aggregations cache to the Associations and Aggregations modules, respectively.
This includes replacing the `association_cache` accessor with a more limited `association_cached?` accessor and making `clear_association_cache` and `clear_aggregation_cache` private.
Diffstat (limited to 'activerecord/test/cases/associations_test.rb')
-rw-r--r--activerecord/test/cases/associations_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations_test.rb b/activerecord/test/cases/associations_test.rb
index 9b0cf4c18f..c40bcd068c 100644
--- a/activerecord/test/cases/associations_test.rb
+++ b/activerecord/test/cases/associations_test.rb
@@ -46,7 +46,7 @@ class AssociationsTest < ActiveRecord::TestCase
firm = Firm.find(1)
assert_kind_of Firm, firm
- firm.clear_association_cache
+ firm.send(:clear_association_cache)
assert_equal Firm.find(1).clients.collect{ |x| x.name }.sort, firm.clients.collect{ |x| x.name }.sort
end
@@ -60,7 +60,7 @@ class AssociationsTest < ActiveRecord::TestCase
firm.clients << clients
assert_equal clients.map(&:name).to_set, firm.clients.map(&:name).to_set
- firm.clear_association_cache
+ firm.send(:clear_association_cache)
assert_equal clients.map(&:name).to_set, firm.clients.map(&:name).to_set
end