From 5f09414f85edfa60ab54ce8b9f8b03874e0670dc Mon Sep 17 00:00:00 2001 From: Sergey Nartimov Date: Tue, 3 Jan 2012 00:55:42 +0300 Subject: deprecate ActiveSupport::Base64 extend and define ::Base64 if needed --- actionpack/test/controller/http_basic_authentication_test.rb | 2 +- actionpack/test/dispatch/request/xml_params_parsing_test.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/http_basic_authentication_test.rb b/actionpack/test/controller/http_basic_authentication_test.rb index 364e96d4f6..7286b249c7 100644 --- a/actionpack/test/controller/http_basic_authentication_test.rb +++ b/actionpack/test/controller/http_basic_authentication_test.rb @@ -132,6 +132,6 @@ class HttpBasicAuthenticationTest < ActionController::TestCase private def encode_credentials(username, password) - "Basic #{ActiveSupport::Base64.encode64("#{username}:#{password}")}" + "Basic #{::Base64.encode64("#{username}:#{password}")}" end end diff --git a/actionpack/test/dispatch/request/xml_params_parsing_test.rb b/actionpack/test/dispatch/request/xml_params_parsing_test.rb index d8fa751548..0984f00066 100644 --- a/actionpack/test/dispatch/request/xml_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/xml_params_parsing_test.rb @@ -41,7 +41,7 @@ class XmlParamsParsingTest < ActionDispatch::IntegrationTest test "parses single file" do with_test_routing do - xml = "David#{ActiveSupport::Base64.encode64('ABC')}" + xml = "David#{::Base64.encode64('ABC')}" post "/parse", xml, default_headers assert_response :ok @@ -55,7 +55,7 @@ class XmlParamsParsingTest < ActionDispatch::IntegrationTest test "logs error if parsing unsuccessful" do with_test_routing do output = StringIO.new - xml = "David#{ActiveSupport::Base64.encode64('ABC')}" + xml = "David#{::Base64.encode64('ABC')}" post "/parse", xml, default_headers.merge('action_dispatch.show_exceptions' => true, 'action_dispatch.logger' => Logger.new(output)) assert_response :error output.rewind && err = output.read @@ -80,8 +80,8 @@ class XmlParamsParsingTest < ActionDispatch::IntegrationTest David - #{ActiveSupport::Base64.encode64('ABC')} - #{ActiveSupport::Base64.encode64('DEF')} + #{::Base64.encode64('ABC')} + #{::Base64.encode64('DEF')} end_body -- cgit v1.2.3