Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
it "should authenticate successfully" do mock_open_id_consumer("http://newuser.example.com", {'email' => 'newuser@example.com'}) lambda { post :create, :openid_url => "http://newuser.example.com", :open_id_complete => '1' }.should change(User, :count) @response.should be_redirect @response.should redirect_to(orders_url) end def mock_open_id_consumer(identity_url, registration={}) @controller.should_receive(:open_id_consumer).and_return(stub('openid_consumer', { :complete => stub('completion_object', { :status => OpenID::SUCCESS, :identity_url => identity_url, :extension_response => registration }) })) end
This paste will be private.
From the Design Piracy series on my blog: