Browse files

Add code and message to test response as per #2460

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2621 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent e7f61ea commit 518540a06734b56d3b56277bf79bb7df95f6980b @NZKoz NZKoz committed Oct 15, 2005
Showing with 8 additions and 0 deletions.
  1. +8 −0 actionpack/lib/action_controller/test_process.rb
View
8 actionpack/lib/action_controller/test_process.rb
@@ -126,6 +126,14 @@ def response_code
headers['Status'][0,3].to_i rescue 0
end
+ def code
+ headers['Status'].to_s.split(' ')[0]
+ end
+
+ def message
+ headers['Status'].to_s.split(' ',2)[1]
+ end
+
# was the response successful?
def success?
response_code == 200

0 comments on commit 518540a

Please sign in to comment.