[rspec-users] How to spec a controller method that involves an rjs redirect
David Chelimsky
dchelimsky at gmail.com
Sat Jan 3 15:31:38 EST 2009
On Fri, Jan 2, 2009 at 10:01 AM, Nasir Jamal <nas35_in at yahoo.com> wrote:
> Hi everyone,
>
> What is the best way to spec a controller method that involves an rjs
> redirect? Something like this
>
> def index
> url_to = @parent ? auction_bids_path(@parent) : auctions_path
> render :update do |page|
> page.redirect_to(url_to)
> end
> end
>
> I tried
> response.should have_rjs
> for the redirect but it didnt work. Any help would be appreciated.
Please be more specific when you say "it didn't work." What precisely
was the code in the spec and what precisely was the error you got.
More information about the rspec-users
mailing list