aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorNick LaMuro <nicklamuro@gmail.com>2017-10-23 11:11:59 -0500
committerNick LaMuro <nicklamuro@gmail.com>2017-10-28 17:32:32 -0500
commitb2545e4106c8388cb2a4d9e06c31954e5ee2c948 (patch)
treec79b1de9b9e1f140c54fccdadb4755ae7a295310 /activesupport/test
parenta822fc513cb3c98207a14fc203c973e13f42e306 (diff)
downloadrails-b2545e4106c8388cb2a4d9e06c31954e5ee2c948.tar.gz
rails-b2545e4106c8388cb2a4d9e06c31954e5ee2c948.tar.bz2
rails-b2545e4106c8388cb2a4d9e06c31954e5ee2c948.zip
Deprecate ActiveSupport::Inflector#acronym_regex
To be removed in Rails 6.0 (default for the deprecate helper). Code moved around as well for the ActiveSupport::Deprecation modules, since it was dependent on ActiveSupport::Inflector being loaded for it to work. By "lazy loading" the Inflector code from within the Deprecation code, we can require ActiveSupport::Deprecation from ActiveSupport::Inflector and not get a circular dependency issue.
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/inflector_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb
index eeec0ab1a5..ad2ec1d67d 100644
--- a/activesupport/test/inflector_test.rb
+++ b/activesupport/test/inflector_test.rb
@@ -224,6 +224,12 @@ class InflectorTest < ActiveSupport::TestCase
assert_equal("json_html_api", ActiveSupport::Inflector.underscore("JSONHTMLAPI"))
end
+ def test_acronym_regexp_is_deprecated
+ assert_deprecated do
+ ActiveSupport::Inflector.inflections.acronym_regex
+ end
+ end
+
def test_underscore
CamelToUnderscore.each do |camel, underscore|
assert_equal(underscore, ActiveSupport::Inflector.underscore(camel))