aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_controller/test_process.rb8
1 files changed, 8 insertions, 0 deletions
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