Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

add client_error? to TestResponseBehavior

#851

ActionController::TestResponseBehavior has easy methods to check if the response code was a success (2xx), redirect (3xx), or server error (5xx). The attached patch (with test) adds a simple query method to check if the response was a client error (4xx).

This makes my tests prettier. :)

Reported by cainlevy · August 18th, 2008 @ 02:38 AM

State: resolved
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. josh
    josh
    • State changed from new to open

    November 22nd, 2008 @ 07:09 PM

  2. Repository
    Repository
    • State changed from open to resolved

    (from [cd1a9ed991e8988dbcc28023b91e76b5ee45f79b]) Add TestResponse#client_error? to check for 4xx status codes [#851 add client_error? to TestResponseBehavior state:resolved]

    Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...

    November 22nd, 2008 @ 07:22 PM