[rspec-users] authentication, controller specs. I think I'm missing something simple ....
francois.beausoleil at gmail.com
Tue Jun 12 15:36:32 EDT 2007
2007/6/10, Rick Tessner <rick.tessner at gmail.com>:
> Nope, no difference there. Joe's explanation of Enumerable#find vs. the
> find method that rails uses makes sense and certainly explains the
> Not sure yet how to work around this one ...
You have to mock #find on the Array instance itself.
things_proxy = [@thing]
@current_user = mock_model(User, :things => things_proxy)
Hope that helps !
More information about the rspec-users