Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
describe "Something" do it "should mock a call to an array" do odontogram = mock("odontogram") photos = mock("photos") odontogram.stub!(:photos).and_return(photos) photos.should_receive(:[]).with(1).and_return("Some Value") odontogram.photos[1] end end
This paste will be private.
From the Design Piracy series on my blog: