Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
require File.dirname(__FILE__) + '/../../spec_helper' describe "/adverts/_advert.rhtml" do # include AdvertsHelper before do @a_advert = mock_model(Advert) @a_advert.should_receive(:id).and_return("123") @a_advert.should_receive(:title).and_return("AdvertTitle") @a_advert.should_receive(:description).and_return("Description") end it "should display an advert" do render :partial => "/adverts/advert", :locals => { :advert => @a_advert } response.should have_tag('div#advert_123') do with_tag('h3', 'AdvertTitle') with_tag('p', 'Description') end end end
This paste will be private.
From the Design Piracy series on my blog: