From 30fa377f330ca8a9543e7079ed6f90a7ca42668d Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 1 Apr 2008 07:39:04 +0000 Subject: Ruby 1.9 compat: encoding and multibyte test fixes git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9194 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/request_test.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/request_test.rb b/actionpack/test/controller/request_test.rb index 4d645f56e0..6916e13417 100644 --- a/actionpack/test/controller/request_test.rb +++ b/actionpack/test/controller/request_test.rb @@ -835,8 +835,10 @@ class MultipartRequestParameterParsingTest < Test::Unit::TestCase assert_equal 'bar', params['foo'] # Ruby CGI doesn't handle multipart/mixed for us. - assert_kind_of String, params['files'] - assert_equal 19756, params['files'].size + files = params['files'] + assert_kind_of String, files + files.force_encoding('ASCII-8BIT') if files.respond_to?(:force_encoding) + assert_equal 19756, files.size end private -- cgit v1.2.3