[rspec-users] How to spec a controller method that involves an rjs redirect
sfeley at gmail.com
Sat Jan 3 23:15:50 EST 2009
On Fri, Jan 2, 2009 at 11:01 AM, Nasir Jamal <nas35_in at yahoo.com> wrote:
> What is the best way to spec a controller method that involves an rjs
> redirect? Something like this
response.should =~ /window\.location\.href = '(whatever your expected
I didn't confirm that regex, obviously. But the concept is pretty
supposed to be generated, then test for its presence in the response.
If it's there, your controller logic worked.
Steve Eley (sfeley at gmail.com)
ESCAPE POD - The Science Fiction Podcast Magazine
More information about the rspec-users