aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relations_test.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-04-22 18:29:05 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-04-22 23:11:15 +0900
commitca9ac310028d0009edf1fbf657541d2dea327535 (patch)
tree83fd7c9fcbe6410ca670ae15439e85fe8c95188e /activerecord/test/cases/relations_test.rb
parent0541a0d5481043a9c78371446389794944daf3f0 (diff)
downloadrails-ca9ac310028d0009edf1fbf657541d2dea327535.tar.gz
rails-ca9ac310028d0009edf1fbf657541d2dea327535.tar.bz2
rails-ca9ac310028d0009edf1fbf657541d2dea327535.zip
`respond_to_missing?` should be private
Follow up of 03d3f036. Some of `respond_to?` were replaced to `respond_to_missing?` in 03d3f036. But the visibility is still public. It should be private.
Diffstat (limited to 'activerecord/test/cases/relations_test.rb')
-rw-r--r--activerecord/test/cases/relations_test.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb
index fcf68b0f2a..7a710f1004 100644
--- a/activerecord/test/cases/relations_test.rb
+++ b/activerecord/test/cases/relations_test.rb
@@ -594,7 +594,7 @@ class RelationTest < ActiveRecord::TestCase
end
end
- def test_respond_to_delegates_to_relation
+ def test_respond_to_delegates_to_arel
relation = Topic.all
fake_arel = Struct.new(:responds) {
def respond_to?(method, access = false)
@@ -607,10 +607,6 @@ class RelationTest < ActiveRecord::TestCase
relation.respond_to?(:matching_attributes)
assert_equal [:matching_attributes, false], fake_arel.responds.first
-
- fake_arel.responds = []
- relation.respond_to?(:matching_attributes, true)
- assert_equal [:matching_attributes, true], fake_arel.responds.first
end
def test_respond_to_dynamic_finders