aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-01-02 14:00:32 -0800
committerXavier Noria <fxn@hashref.com>2012-01-02 14:00:32 -0800
commit7bdfbac580f7b03953f2aabf610d98c437da376e (patch)
treec130e4279ffee79d0cd6a69610480ff9eb9ca0d1 /activesupport/test
parent6e9cd3846811718611543dae049c000076319587 (diff)
parent5f09414f85edfa60ab54ce8b9f8b03874e0670dc (diff)
downloadrails-7bdfbac580f7b03953f2aabf610d98c437da376e.tar.gz
rails-7bdfbac580f7b03953f2aabf610d98c437da376e.tar.bz2
rails-7bdfbac580f7b03953f2aabf610d98c437da376e.zip
Merge pull request #4267 from lest/3-2-deprecate-activesupport-base64
deprecate ActiveSupport::Base64
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/base64_ext_test.rb6
-rw-r--r--activesupport/test/message_encryptor_test.rb6
2 files changed, 7 insertions, 5 deletions
diff --git a/activesupport/test/core_ext/base64_ext_test.rb b/activesupport/test/core_ext/base64_ext_test.rb
index bd0e9f843d..544c990b3c 100644
--- a/activesupport/test/core_ext/base64_ext_test.rb
+++ b/activesupport/test/core_ext/base64_ext_test.rb
@@ -2,7 +2,9 @@ require 'abstract_unit'
class Base64Test < Test::Unit::TestCase
def test_no_newline_in_encoded_value
- assert_match(/\n/, ActiveSupport::Base64.encode64("oneverylongstringthatwouldnormallybesplitupbynewlinesbytheregularbase64"))
- assert_no_match(/\n/, ActiveSupport::Base64.encode64s("oneverylongstringthatwouldnormallybesplitupbynewlinesbytheregularbase64"))
+ ActiveSupport::Deprecation.silence do
+ assert_match(/\n/, ActiveSupport::Base64.encode64("oneverylongstringthatwouldnormallybesplitupbynewlinesbytheregularbase64"))
+ assert_no_match(/\n/, ActiveSupport::Base64.encode64s("oneverylongstringthatwouldnormallybesplitupbynewlinesbytheregularbase64"))
+ end
end
end
diff --git a/activesupport/test/message_encryptor_test.rb b/activesupport/test/message_encryptor_test.rb
index 3e6a5c6602..5f29969b72 100644
--- a/activesupport/test/message_encryptor_test.rb
+++ b/activesupport/test/message_encryptor_test.rb
@@ -82,10 +82,10 @@ class MessageEncryptorTest < ActiveSupport::TestCase
end
def munge(base64_string)
- bits = ActiveSupport::Base64.decode64(base64_string)
+ bits = ::Base64.decode64(base64_string)
bits.reverse!
- ActiveSupport::Base64.encode64s(bits)
+ ::Base64.strict_encode64(bits)
end
end
-end \ No newline at end of file
+end