Ruby on Rails
Friday, March 29, 2013
On Friday, March 29, 2013 7:32:36 AM UTC, Jussi Hirvi wrote:
On Thursday, March 28, 2013 4:06:09 PM UTC+2, Dihital wrote:Redirect ends current request and starts a new one, so you are right that that's the case (another action isn't called nor its template rendered).That left me pondering, why does it matter that a new request is started. Anyway, it seems that rspec tests can verify that a redirect to a given path occurs, but there is no way to evaluate the contents of the resulting page:Maybe someone can verify that this is the case, or tell me otherwise?
That sounds like they're talking about rspec controller specs (which are designed to spec a single request to a controller) rather than rspec request specs which are designed to do a series of requests (and which I'm not sure existed back in 2010).
Make sure that you are actually doing a request spec (is the file in /spec/requests), and as some of the answers on that page mention, automatic redirect following differs across capybara drivers.
Fred
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/AJOSkqBd10cJ.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment