[rspec-users] problem getting started with stubbing in rails controller specs

Kyle Hargraves philodespotos at gmail.com
Fri Jun 15 16:16:59 EDT 2007

On Jun 15, 2007, at 1:53 PM, Ingo Weiss wrote:

> Thanks so much, Anthony, this works!
> I thought that .with(:all) would set the expectation that 'find' is
> called with the :all parameter like this:
> Station.find(:all)
> but apparently that is not what's happening
> Ingo

It is indeed expecting 'find' to be called with(:all), but you aren't  
doing so:

   @stations = Station.find(:all, :order => 'name')

All of the parameters are taken into account. IIRC you can't use with 
(:all, any_args) either, though I might be wrong.


More information about the rspec-users mailing list