diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-18 21:14:07 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-18 21:14:07 +0000 |
commit | f91acf0258b3d40cbb31663e965669b7199be051 (patch) | |
tree | a5a1caabd8c681b459360d92b7b62bf665c9a1eb /actionpack/test | |
parent | 2bdac92dcf8caf9e2b45796f8af56da6a293d722 (diff) | |
download | rails-f91acf0258b3d40cbb31663e965669b7199be051.tar.gz rails-f91acf0258b3d40cbb31663e965669b7199be051.tar.bz2 rails-f91acf0258b3d40cbb31663e965669b7199be051.zip |
Ruby 1.9 compat: move from the deprecated Base64 module to ActiveSupport::Base64. Closes #10554.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/activerecord/active_record_store_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/request_test.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/activerecord/active_record_store_test.rb b/actionpack/test/activerecord/active_record_store_test.rb index 707a0a75cc..61900ac252 100644 --- a/actionpack/test/activerecord/active_record_store_test.rb +++ b/actionpack/test/activerecord/active_record_store_test.rb @@ -66,7 +66,7 @@ class ActiveRecordStoreTest < ActiveRecordTestCase def test_save_unloaded_session c = session_class.connection - bogus_class = c.quote(Base64.encode64("\004\010o:\vBlammo\000")) + bogus_class = c.quote(ActiveSupport::Base64.encode64("\004\010o:\vBlammo\000")) c.insert("INSERT INTO #{session_class.table_name} ('#{session_id_column}', 'data') VALUES ('abcdefghijklmnop', #{bogus_class})") sess = session_class.find_by_session_id('abcdefghijklmnop') diff --git a/actionpack/test/controller/request_test.rb b/actionpack/test/controller/request_test.rb index 698d3cbd2a..a81fa4d866 100644 --- a/actionpack/test/controller/request_test.rb +++ b/actionpack/test/controller/request_test.rb @@ -789,7 +789,7 @@ end class XmlParamsParsingTest < Test::Unit::TestCase def test_single_file - person = parse_body("<person><name>David</name><avatar type='file' name='me.jpg' content_type='image/jpg'>#{Base64.encode64('ABC')}</avatar></person>") + person = parse_body("<person><name>David</name><avatar type='file' name='me.jpg' content_type='image/jpg'>#{ActiveSupport::Base64.encode64('ABC')}</avatar></person>") assert_equal "image/jpg", person['person']['avatar'].content_type assert_equal "me.jpg", person['person']['avatar'].original_filename @@ -801,8 +801,8 @@ class XmlParamsParsingTest < Test::Unit::TestCase <person> <name>David</name> <avatars> - <avatar type='file' name='me.jpg' content_type='image/jpg'>#{Base64.encode64('ABC')}</avatar> - <avatar type='file' name='you.gif' content_type='image/gif'>#{Base64.encode64('DEF')}</avatar> + <avatar type='file' name='me.jpg' content_type='image/jpg'>#{ActiveSupport::Base64.encode64('ABC')}</avatar> + <avatar type='file' name='you.gif' content_type='image/gif'>#{ActiveSupport::Base64.encode64('DEF')}</avatar> </avatars> </person> end_body |