From 5ca86ac8f924b333a5a01a47cc07cbcf39c16e80 Mon Sep 17 00:00:00 2001 From: Sergey Nartimov Date: Sat, 24 Dec 2011 15:57:54 +0300 Subject: deprecate String#encoding_aware? and remove its usage --- activesupport/test/core_ext/string_ext_test.rb | 4 +++- activesupport/test/gzip_test.rb | 5 +---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'activesupport/test') diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb index aeae2579b4..2e44cbe247 100644 --- a/activesupport/test/core_ext/string_ext_test.rb +++ b/activesupport/test/core_ext/string_ext_test.rb @@ -445,7 +445,9 @@ class OutputSafetyTest < ActiveSupport::TestCase end test 'knows whether it is encoding aware' do - assert 'ruby'.encoding_aware? + assert_deprecated do + assert 'ruby'.encoding_aware? + end end test "call to_param returns a normal string" do diff --git a/activesupport/test/gzip_test.rb b/activesupport/test/gzip_test.rb index f564e63f29..626981dc9d 100644 --- a/activesupport/test/gzip_test.rb +++ b/activesupport/test/gzip_test.rb @@ -9,10 +9,7 @@ class GzipTest < Test::Unit::TestCase def test_compress_should_return_a_binary_string compressed = ActiveSupport::Gzip.compress('') - if "".encoding_aware? - assert_equal Encoding.find('binary'), compressed.encoding - end - + assert_equal Encoding.find('binary'), compressed.encoding assert !compressed.blank?, "a compressed blank string should not be blank" end end -- cgit v1.2.3