[rspec-users] How to spec a controller method that involves an rjs redirect

Nasir Jamal nas35_in at yahoo.com
Fri Jan 2 11:01:29 EST 2009


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.

Thanks



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090102/4314cdc2/attachment.html>


More information about the rspec-users mailing list