Active support instead of ActiveSupport::Deprecation.silence we can use assert_deprecated
Merge pull request #14598 from rajcybage/assert_dprecated_for_as_test_case

Active support instead of ActiveSupport::Deprecation.silence we can use assert_deprecated