Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
module Foo module Bar class ClassInEnclosingModule; end def method_in_enclosing_module; end describe "Class and Method defined in enclosing module are accessible, so Examples" do it "does automatically get access to the context of Foo::Bar" do Foo::Bar end it "does automatically get access to ClassInEnclosingModule" do ClassInEnclosingModule.new end it "does automatically get access to method_in_enclosing_module" do method_in_enclosing_module end describe "that live inside a nested group" do it "does automatically get access to the context of Foo::Bar" do Foo::Bar end it "does automatically get access to ClassInEnclosingModule" do ClassInEnclosingModule.new end it "does automatically get access to method_in_enclosing_module" do method_in_enclosing_module end end end describe "Method and Class defined in group are not accessible, so examples" do class ClassDefinedInGroup; end def method_defined_in_group; end it "does automatically get access to the context of Foo::Bar" do Foo::Bar end it "does not automatically get access to ClassDefinedInGroup" do lambda {ClassDefinedInGroup.new}.should raise_error(/uninitialized/) end it "does not automatically get access to method_defined_in_group" do lambda {method_defined_in_group}.should raise_error(/undefined/) end describe "that live inside a nested group" do it "does automatically get access to the context of Foo::Bar" do Foo::Bar end it "does not automatically get access to ClassDefinedInGroup" do lambda {ClassDefinedInGroup.new}.should raise_error(/uninitialized/) end it "does not automatically get access to method_defined_in_group" do lambda {method_defined_in_group}.should raise_error(/undefined/) end end end end end
This paste will be private.
From the Design Piracy series on my blog: