Re: Beginning Ruby on Rails E-Commerce : Errata Help

Bala Paranj
2006-12-02T21:30:38Z

Following table might help:

    *  :success (status code is 200)
    * :redirect (status code is within 300..399)
    * :missing (status code is 404)
    * :error (status code is within 500..599)
    * any number (to specifically reference a particular status code)

assert_response :success      # page rendered ok
assert_response :redirect     # we''ve been redirected
assert_response :missing      # not found
assert_response 505           # status code was 505

For more check out: http://manuals.rubyonrails.com/read/chapter/28

You may also want to use curl on the command line to see the response
from the server. It also helps to write assert_tag and other
assertions.

On 12/2/06, Nick Coyne
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:
>
> Anyone figure this out? I get:
> Expected response to be a <:redirect>, but was <200>