diff options
author | John Firebaugh <john_firebaugh@bigfix.com> | 2010-08-06 11:24:09 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-25 10:58:07 +0200 |
commit | 308517e913ef1e8d9f13e023bc450374b5ed780a (patch) | |
tree | 1052269f59d600ead5a5f4b23d5acd2812e4b252 /actionpack | |
parent | c5093799234de248d709e0bff1a28b4d29eb658e (diff) | |
download | rails-308517e913ef1e8d9f13e023bc450374b5ed780a.tar.gz rails-308517e913ef1e8d9f13e023bc450374b5ed780a.tar.bz2 rails-308517e913ef1e8d9f13e023bc450374b5ed780a.zip |
Don't duplicate Rack::Response functionality. [#5320 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/test_response.rb | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/actionpack/lib/action_dispatch/testing/test_response.rb b/actionpack/lib/action_dispatch/testing/test_response.rb index 926034762f..82039e72e7 100644 --- a/actionpack/lib/action_dispatch/testing/test_response.rb +++ b/actionpack/lib/action_dispatch/testing/test_response.rb @@ -15,29 +15,15 @@ module ActionDispatch end # Was the response successful? - def success? - (200..299).include?(response_code) - end + alias_method :success?, :successful? # Was the URL not found? - def missing? - response_code == 404 - end + alias_method :missing?, :not_found? # Were we redirected? - def redirect? - (300..399).include?(response_code) - end + alias_method :redirect?, :redirection? # Was there a server-side error? - def error? - (500..599).include?(response_code) - end - alias_method :server_error?, :error? - - # Was there a client client? - def client_error? - (400..499).include?(response_code) - end + alias_method :error?, :server_error? end end |