diff options
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/relation/delegation_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation/delegation_test.rb b/activerecord/test/cases/relation/delegation_test.rb index cb6e4d76d3..3b15f051b2 100644 --- a/activerecord/test/cases/relation/delegation_test.rb +++ b/activerecord/test/cases/relation/delegation_test.rb @@ -21,8 +21,22 @@ module ActiveRecord end end + module DeprecatedArelDelegationTests + AREL_METHODS = [ + :with, :orders, :froms, :project, :projections, :taken, :constraints, :exists, :locked, :where_sql, + :ast, :source, :join_sources, :to_dot, :bind_values, :create_insert, :create_true, :create_false + ] + + def test_deprecate_arel_delegation + AREL_METHODS.each do |method| + assert_deprecated { target.public_send(method) } + end + end + end + class DelegationAssociationTest < ActiveRecord::TestCase include DelegationWhitelistTests + include DeprecatedArelDelegationTests fixtures :posts @@ -33,6 +47,7 @@ module ActiveRecord class DelegationRelationTest < ActiveRecord::TestCase include DelegationWhitelistTests + include DeprecatedArelDelegationTests fixtures :comments |