Displaying 1 result from an estimated 1 matches for "update_imag".
Did you mean:
update_image
2007 Aug 23
6
controller spec with model that validates_uniqueness
I want to use mocks and stubs to test the controller, but am having
trouble getting my validation not to trigger. Here''s the code:
# spec:
Image.stub!(:find).and_return(@image)
@image.should_receive(:save!).once.with(:any_args)
put :update, :id => @image.id, :category_id =>
@category.id, :image => {:name => ''test'', :image_number =>