From 518540a06734b56d3b56277bf79bb7df95f6980b Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Sat, 15 Oct 2005 18:36:41 +0000 Subject: 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 --- actionpack/lib/action_controller/test_process.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'actionpack/lib/action_controller/test_process.rb') diff --git a/actionpack/lib/action_controller/test_process.rb b/actionpack/lib/action_controller/test_process.rb index f7b4280d2e..851494a89c 100644 --- a/actionpack/lib/action_controller/test_process.rb +++ b/actionpack/lib/action_controller/test_process.rb @@ -126,6 +126,14 @@ module ActionController #:nodoc: 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 -- cgit v1.2.3