diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-12-29 12:31:08 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-12-29 12:31:08 +0530 |
commit | 981f69639841759a558a0083cd507fa610d564ad (patch) | |
tree | 24a7dc34bda6f7e893c5289162f45dced9ddae61 /activerecord/test/cases | |
parent | bc933d0fa1b3a89deaf3e7c74d7717eb8fc7152a (diff) | |
download | rails-981f69639841759a558a0083cd507fa610d564ad.tar.gz rails-981f69639841759a558a0083cd507fa610d564ad.tar.bz2 rails-981f69639841759a558a0083cd507fa610d564ad.zip |
Relation#respond_to? should take second argument for responding to private methods
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 1c344c0b48..8c1ce07e75 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -146,6 +146,13 @@ class RelationTest < ActiveRecord::TestCase end end + def test_respond_to_private_arel_methods + relation = Topic.scoped + + assert ! relation.respond_to?(:matching_attributes) + assert relation.respond_to?(:matching_attributes, true) + end + def test_respond_to_dynamic_finders relation = Topic.scoped |