What is the best way to spec a controller method that involves an rjs
redirect? Something like this
Consider:
response.should =~ /window.location.href = ‘(whatever your expected
path is)’;/
I didn’t confirm that regex, obviously. But the concept is pretty
simple: if you know how the RJS redirect works and what Javascript is
supposed to be generated, then test for its presence in the response.
If it’s there, your controller logic worked.