it "should update a category with \
given parameters and be successful" do
@category.stub!(:find).with("id" => 1).and_return(@category)
Category.should_receive(:find).and_return(@category)
@category.should_receive(:update_attributes).and_return(true)
@category.stub!(:name)
post 'update', {:category => { :name => "Test23",
:description => "Test45"}, :id => 1}
response.should redirect_to(category_url(@category))
end

it "should update a category with \
given parameters and be successful" do
@category.stub!(:find).with("id" => 1).and_return(@category)
Category.should_receive(:find).and_return(@category)
@category.should_receive(:update_attributes).and_return(false)
@category.stub!(:name)
post 'update', {:category => { :name => "Test23",
:description => "Test45"}, :id => 1}
response.should render_template('categories/edit')
end