anchor.diff:  
       A test may also contain nested tests.
   
  -    <code>
  -    D "outer test" do
  -      # assertions and logic here
  -
  -      D "inner test" do
  -        # more assertions and logic here
  -      end
  -    end
  -    </code>
  +        D "outer test" do
  +          # assertions and logic here
  +
  +          D "inner test" do
  +            # more assertions and logic here
  +          end
  +        end
  +
  +    {:lang=ruby}
   
   
       %|section "Hooks"
   
         The [`D()` method](<%= dfect_api %>) provides several entry points (hooks) into the test execution process:
   
  -      <code>
  -      D "outer test" do
  -        D .<  { puts "before each nested test" }
  -        D .>  { puts "after  each nested test" }
  -        D .<< { puts "before all nested tests" }
  -        D .>> { puts "after  all nested tests" }
  -
  -        D "inner test" do
  -          # assertions and logic here
  -        end
  -      end
  -      </code>
  +          D "outer test" do
  +            D .<  { puts "before each nested test" }
  +            D .>  { puts "after  each nested test" }
  +            D .<< { puts "before all nested tests" }
  +            D .>> { puts "after  all nested tests" }
  +
  +            D "inner test" do
  +              # assertions and logic here
  +            end
  +          end
  +
  +      {:lang=ruby}
   
         A hook method may be called multiple times.  Each call registers additional logic to execute during the hook:
   
  -      <code>
  -      D .< { puts "do something" }
  -      D .< { puts "do something more!" }
  -      </code>
  +          D .< { puts "do something" }
  +          D .< { puts "do something more!" }
  +
  +      {:lang=ruby}
   
   
       %|section "Insulation"
   
         Use the singleton class of a temporary object to shield your test logic from Ruby's global environment, the code being tested, and from other tests:
   
  -      <code>
  -      class << Object.new
  -        # your test logic here
  -      end
  -      </code>
  +          class << Object.new
  +            # your test logic here
  +          end
  +
  +      {:lang=ruby}
   
         Inside this insulated environment, you are free to:
         * mix-in any modules your test logic needs
  
positive.code: 
        For example:
  
        <code>
        class << Object.new
          include SomeModule
          extend AnotherModule
  
          YOUR_CONSTANT = 123
  
          D "your tests here" do
            # your test logic here
  
            your_helper_method
          end
  
          def self.your_helper_method
            # your helper logic here
  
            helper = YourHelperClass.new
            helper.do_something_helpful
  
            T { 2 + 2 != 5 }
          end
  
          class YourHelperClass
            # your helper logic here
          end
        end
        </code>
  
  
    %|section "Execution"
  
      You can configure test execution using:
  
      <code>
      Dfect.options = your_options_hash
      </code>
  
      You can execute all tests defined thus far using:
  
      <code>
      Dfect.run
      </code>
  
      You can stop this execution at any time using:
  
      <code>
      Dfect.stop
      </code>
  
      You can view the results of execution using:
  
      <code>
      puts Dfect.report.to_yaml
      </code>
  
      See the [API documentation](<%= dfect_api %>) for details and examples.
  
  
      %|section "Automatic test execution"
  
        <code>
        require 'rubygems'
        require 'dfect/auto'   # <== notice the "auto"
        </code>
  
        The above code will mix-in the `Dfect` module into your program and will execute all tests defined by your program before it terminates.
  
  
    %|example "A sample unit test"
  
      <code>
      require 'rubygems'
      require 'dfect/auto'
  
      D "a test" do
        D "a nested test" do
        end
  
        D "another nested test" do
        end
  
        D "a complex test" do
          y = 83
  
          D "with more nested tests" do
            x = 5
  
            T { x > 2 }   # passes
            F { x > 2 }   # fails
            E { x.hello } # passes
          end
        end
  
        D .< do
          puts "this is executed before every test in this scope"
        end
  
        D .> do
          puts "this is executed after every test in this scope"
        end
  
        D .<< do
          puts "this is executed once, before all tests in this scope"
        end
  
        D .>> do
          puts "this is executed once, after all tests in this scope"
        end
      end
      </code>
  
  
negative.code: 
    Begin by loading <%= $project %> into your program:
  
        require 'rubygems'
        require 'dfect'
  
    {:lang=ruby}
  
    You now have access to the [`Dfect` module](<%= dfect_api %>), which provides mixin-able instance methods that are also directly-callable as class methods:
  
        Dfect.D "hello" do  # D() is a class method
          puts "world"
        end
  
        # the above is same as:
  
        include Dfect       # mix-in the Dfect API
  
        D "hello" do        # D() is an instance method
          puts "world"
        end
  
    {:lang=ruby}
  
    The following sections explain these provided methods in detail.
  
  