Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
require 'test/unit' require 'rubygems' require 'mocha' class TestFoo < Test::Unit::TestCase class FooController def bar_action operation_with_render end def operation_with_render render :text => 'hello' end def render options = {} puts options[:text] end end def setup @controller = FooController.new end def test_bar @controller.expects(:operation_with_render).returns( Proc.new{ @controller.render :text => 'goodbye' } ) @controller.bar_action end end
This paste will be private.
From the Design Piracy series on my blog: