diff --git a/activesupport/lib/active_support/deprecation/reporting.rb b/activesupport/lib/active_support/deprecation/reporting.rb index bf3b19377fe..8b046987ab2 100644 --- a/activesupport/lib/active_support/deprecation/reporting.rb +++ b/activesupport/lib/active_support/deprecation/reporting.rb @@ -172,7 +172,7 @@ module ActiveSupport LIB_DIR = RbConfig::CONFIG["libdir"] def ignored_callstack?(path) - path.start_with?(RAILS_GEM_ROOT, LIB_DIR) + path.start_with?(RAILS_GEM_ROOT, LIB_DIR) || path.include?("(message, *) { @message = message } + method_that_emits_deprecation_with_internal_method(@deprecator) + + assert_not_includes(@message, "internal") + end + private def method_that_emits_deprecation(deprecator) deprecator.warn end + def method_that_emits_deprecation_with_internal_method(deprecator) + [1].each { deprecator.warn } + end + def with_rails_application_deprecators(&block) application = Struct.new(:deprecators).new(ActiveSupport::Deprecation::Deprecators.new) rails = Struct.new(:application).new(application)