aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/multibyte_chars_test.rb
diff options
context:
space:
mode:
authorFrancesco Rodríguez <frodsan@me.com>2018-10-15 08:29:56 +0200
committerJeremy Daer <jeremydaer@gmail.com>2018-10-15 13:11:59 -0700
commit134dab46e4e94d7e6e37cec43dca8183fe72aea6 (patch)
treeee9732f894c356dff966938952d41614be06a794 /activesupport/test/multibyte_chars_test.rb
parent25d1fefe877095a539a99df9db404d7fd994ed7c (diff)
downloadrails-134dab46e4e94d7e6e37cec43dca8183fe72aea6.tar.gz
rails-134dab46e4e94d7e6e37cec43dca8183fe72aea6.tar.bz2
rails-134dab46e4e94d7e6e37cec43dca8183fe72aea6.zip
Deprecate ActiveSupport::Multibyte::Chars.consumes?
In favor of String#is_utf8?. I think this method was made for internal use only, and its usage was removed here: https://github.com/rails/rails/pull/8261/files#diff-ce956ebe93786930e40f18db1da5fd46L39.
Diffstat (limited to 'activesupport/test/multibyte_chars_test.rb')
-rw-r--r--activesupport/test/multibyte_chars_test.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/activesupport/test/multibyte_chars_test.rb b/activesupport/test/multibyte_chars_test.rb
index 86bca2e40b..6b33f5f9b2 100644
--- a/activesupport/test/multibyte_chars_test.rb
+++ b/activesupport/test/multibyte_chars_test.rb
@@ -73,9 +73,15 @@ class MultibyteCharsTest < ActiveSupport::TestCase
end
def test_consumes_utf8_strings
- assert @proxy_class.consumes?(UNICODE_STRING)
- assert @proxy_class.consumes?(ASCII_STRING)
- assert_not @proxy_class.consumes?(BYTE_STRING)
+ ActiveSupport::Deprecation.silence do
+ assert @proxy_class.consumes?(UNICODE_STRING)
+ assert @proxy_class.consumes?(ASCII_STRING)
+ assert_not @proxy_class.consumes?(BYTE_STRING)
+ end
+ end
+
+ def test_consumes_is_deprecated
+ assert_deprecated { @proxy_class.consumes?(UNICODE_STRING) }
end
def test_concatenation_should_return_a_proxy_class_instance