diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-04-25 17:38:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-25 17:38:56 -0700 |
commit | c7ee244644903da5045c54f72e25a8ee6eb3bd68 (patch) | |
tree | a2359c8bc5d8afd7abd64ad5e9445b68ab1e3bc9 /activerecord/test | |
parent | 550b5e0824cc1cbbe21a1554d1b3f347af08dd30 (diff) | |
parent | ca9ac310028d0009edf1fbf657541d2dea327535 (diff) | |
download | rails-c7ee244644903da5045c54f72e25a8ee6eb3bd68.tar.gz rails-c7ee244644903da5045c54f72e25a8ee6eb3bd68.tar.bz2 rails-c7ee244644903da5045c54f72e25a8ee6eb3bd68.zip |
Merge pull request #28831 from kamipo/respond_to_missing_should_be_private
`respond_to_missing?` should be private
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/associations/has_many_associations_test.rb | 1 | ||||
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 6 |
2 files changed, 1 insertions, 6 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index 25133fc580..7429eb7425 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -2040,7 +2040,6 @@ class HasManyAssociationsTest < ActiveRecord::TestCase def test_respond_to_private_class_methods client_association = companies(:first_firm).clients assert !client_association.respond_to?(:private_method) - assert client_association.respond_to?(:private_method, true) end def test_creating_using_primary_key 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 |