aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@gmail.com>2015-09-09 08:34:01 -0400
committerEileen M. Uchitelle <eileencodes@gmail.com>2015-09-09 08:34:01 -0400
commitd73d1a26b342b2323a58b55021eb8701790ada2a (patch)
tree2093e9eb0e739b4e64bb226f60f2eb119b3529be /activerecord/test/cases
parentdfb89c9ff2628da9edda7d95fba8657d2fc16d3b (diff)
parent712fc8a570bc0709c3be5645e9808b0ad8fcfe45 (diff)
downloadrails-d73d1a26b342b2323a58b55021eb8701790ada2a.tar.gz
rails-d73d1a26b342b2323a58b55021eb8701790ada2a.tar.bz2
rails-d73d1a26b342b2323a58b55021eb8701790ada2a.zip
Merge pull request #21486 from bogdan/refactor-has-many-counter-cache
HasManyAssociation: moved half of counter cache code to reflection
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/associations/has_many_associations_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb
index f487065d9d..7de5bc01ae 100644
--- a/activerecord/test/cases/associations/has_many_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_associations_test.rb
@@ -939,7 +939,7 @@ class HasManyAssociationsTest < ActiveRecord::TestCase
# option is not given on the association.
ship = Ship.create(name: 'Countless', treasures_count: 10)
- assert_not ship.treasures.instance_variable_get('@association').send(:has_cached_counter?)
+ assert_not Ship.reflect_on_association(:treasures).has_cached_counter?
# Count should come from sql count() of treasures rather than treasures_count attribute
assert_equal ship.treasures.size, 0