[rspec-users] find_all_by returning nil

David Chelimsky dchelimsky at gmail.com
Mon Aug 11 14:32:32 EDT 2008


On Mon, Aug 11, 2008 at 1:31 PM, Craig Demyanovich
<cdemyanovich at gmail.com> wrote:
> Looks like this line
>
> Product.stub(!find_all_by_category_id).with(anything()).and_return([product])
>
> might be the culprit. It should be stub!(find... instead of stub(!find....

Actually, stub!(:find....

>
> Regards,
> Craig
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list