Thursday, September 16, 2010

Tracking RSPEC Test Execution So Debugging Statements Are Segmented

Throw the following into an initializer:

module Spec
  module Example
    module ExampleMethods
      def execute_with_print_logging(run_options, instance_variables)
        p "RSPEC TRACE: #{description} => #{@_proxy.location}"
        execute_without_print_logging(run_options, instance_variables)
      end
      alias_method_chain :execute, :print_logging
    end
 end
end
Post a Comment