This project is archived and is in readonly mode.

#5320 ✓resolved
John Firebaugh

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

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

Pages