[rspec-users] Testing create in Rails controller

Shane Mingins smingins at elctech.com
Mon Jun 11 14:14:00 EDT 2007


Thanks David

On 11/06/2007, at 11:25 PM, David Chelimsky wrote:

>
> Two problems.
>
> 1. The return value from Product.new(params[:product]) gets assigned
> to @product. You need to tell the :new method to return something when
> setting up the Message Expectation.
>
> 2. :save is getting called on @product, not the Product class.
>
>
> Enjoy,
> David
>
>



More information about the rspec-users mailing list