[rspec-users] Testing create in Rails controller
smingins at elctech.com
Mon Jun 11 14:14:00 EDT 2007
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.
More information about the rspec-users