[rspec-users] params not available for controller specs?

Al Chou hotfusionman at yahoo.com
Tue Dec 4 03:17:40 EST 2007

Hi, all,

I'm trying to write a spec for a controller method that starts out:

  def download
    @orders = Order.find( params[:ids] )

and started writing a spec that set params[:ids] to a mock.  I was surprised to discover that controller specs (at least in RSpec 1.0.8) don't offer the use of the params object (per http://rspec.rubyforge.org/documentation/rails/writing/controllers.html), though assigns, flash, and session are available.  Maybe I'm missing something, but it seems to me that it would be helpful if controller specs could use params also....


Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071204/027571ab/attachment.html 

More information about the rspec-users mailing list