This project is archived and is in readonly mode.
ActionDispatch::TestResponse duplicates Rack::Response functionality
Reported by John Firebaugh | August 6th, 2010 @ 07:30 PM
Rack::Response::Helpers (included in Rack::Response) provides #successful?, #redirection?, #client_error?, #server_error?, and #not_found?, with identical semantics to equivalent ActionDispatch::TestResponse methods.
Therefore:
- success? can be aliased to successful? or deprecated.
- missing? can be aliased to not_found? or deprecated.
- redirect? can be aliased to redirection? or deprecated.
- client_error? and server_error? can be removed.
- error? can be aliased to server_error? or deprecated.
If we deprecate these methods, .from_response will remain the only non-deprecated functionality provided by ActionDispatch::TestResponse.
Comments and changes to this ticket
-
John Firebaugh August 6th, 2010 @ 07:32 PM
Patches with aliasing: http://github.com/bigfix/rails/commits/8994
-
John Firebaugh August 6th, 2010 @ 07:34 PM
Whoops, meant to use the ticket number: http://github.com/bigfix/rails/commits/5320
-
Repository September 25th, 2010 @ 10:02 AM
- State changed from new to resolved
(from [308517e913ef1e8d9f13e023bc450374b5ed780a]) Don't duplicate Rack::Response functionality. [#5320 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/308517e913ef1e8d9f13e023bc4503...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Referenced by
- 5320 ActionDispatch::TestResponse duplicates Rack::Response functionality (from [308517e913ef1e8d9f13e023bc450374b5ed780a]) Don't d...