Wednesday, April 6, 2011

[Rails] Re: Getting a 200 OK instead of a redirect with Rails 3 in test

On Apr 6, 9:46 am, Phoenix Rising <polarisris...@gmail.com> wrote:

> The response.should line fails because the response object isn't a
> redirect, it's a 200 OK with a blank response body.  However, if I try
> it in my browser (under development mode) it seems to redirect exactly
> as expected.  This just presents a problem because I'm not sure how to
> properly write a test for it.
>

functional tests don't go through routing. You may have to use
something which tests the full stack like a cucumber story.

Fred
> Does anyone have any pointers on what I'm doing wrong here?  Thanks
> for any help you can provide :)

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate