diff options
author | Michael Koziarski <michael@koziarski.com> | 2005-10-15 18:36:41 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2005-10-15 18:36:41 +0000 |
commit | 518540a06734b56d3b56277bf79bb7df95f6980b (patch) | |
tree | cf97fddd9e3a46b63a12e70f487f7461ed21cf85 /actionpack/lib/action_controller/test_process.rb | |
parent | e7f61eab56d8a628cc605e5fa1e9055c4df852c7 (diff) | |
download | rails-518540a06734b56d3b56277bf79bb7df95f6980b.tar.gz rails-518540a06734b56d3b56277bf79bb7df95f6980b.tar.bz2 rails-518540a06734b56d3b56277bf79bb7df95f6980b.zip |
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
Diffstat (limited to 'actionpack/lib/action_controller/test_process.rb')
-rw-r--r-- | actionpack/lib/action_controller/test_process.rb | 8 |
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 |