diff --git a/actionpack/lib/action_controller/test_process.rb b/actionpack/lib/action_controller/test_process.rb index 851494a89c60f5220ce9713c77697d6134b2ecc8..40d46661d8b3afb59aed98ea2c11a414b9c6573e 100644 --- a/actionpack/lib/action_controller/test_process.rb +++ b/actionpack/lib/action_controller/test_process.rb @@ -125,7 +125,8 @@ class TestResponse < AbstractResponse #:nodoc: def response_code headers['Status'][0,3].to_i rescue 0 end - + + # returns a String to ensure compatibility with Net::HTTPResponse def code headers['Status'].to_s.split(' ')[0] end