Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
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
This paste will be private.
From the Design Piracy series on my blog: