Sha256: e8f05f50d6c2daa5fdaa14c701f137aa6bea89cc6da36cc9fab5ca36e3af2a5e

Contents?: true

Size: 1.33 KB

Versions: 20

Compression:

Stored size: 1.33 KB

Contents

# Monkey patch in CTRL-C support for rspec from 
# http://github.com/dchelimsky/rspec/commit/029f77c5063894cf52af05335b8e1c278411978b
# until it gets released

module Spec
  module Example
    module ExampleMethods
      def execute(run_options, instance_variables) # :nodoc:
        run_options.reporter.example_started(@_proxy)
        set_instance_variables_from_hash(instance_variables)
 
        execution_error = nil
        Timeout.timeout(run_options.timeout) do
          begin
            before_each_example
            instance_eval(&@_implementation)
          rescue Interrupt
            exit 1
          rescue Exception => e
            execution_error ||= e
          end
          begin
            after_each_example
          rescue Interrupt
            exit 1
          rescue Exception => e
            execution_error ||= e
          end
        end
 
        run_options.reporter.example_finished(@_proxy.update(description), execution_error)
        success = execution_error.nil? || ExamplePendingError === execution_error
      end
    end
  end
end

module Spec
  module Runner
    class ExampleGroupRunner
      def run
        prepare
        success = true
        example_groups.each do |example_group|
          success = success & example_group.run(@options)
        end
        finish
        success
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
activefacts-1.6.0 spec/helpers/ctrl_c_support.rb
activefacts-1.5.3 spec/helpers/ctrl_c_support.rb
activefacts-1.5.2 spec/helpers/ctrl_c_support.rb
activefacts-1.5.1 spec/helpers/ctrl_c_support.rb
activefacts-1.5.0 spec/helpers/ctrl_c_support.rb
activefacts-1.3.0 spec/helpers/ctrl_c_support.rb
activefacts-1.2.1 spec/helpers/ctrl_c_support.rb
activefacts-1.2.0 spec/helpers/ctrl_c_support.rb
activefacts-1.1.0 spec/helpers/ctrl_c_support.rb
activefacts-1.0.2 spec/helpers/ctrl_c_support.rb
activefacts-1.0.1 spec/helpers/ctrl_c_support.rb
activefacts-1.0.0 spec/helpers/ctrl_c_support.rb
activefacts-0.8.18 spec/helpers/ctrl_c_support.rb
activefacts-0.8.16 spec/helpers/ctrl_c_support.rb
activefacts-0.8.15 spec/helpers/ctrl_c_support.rb
activefacts-0.8.13 spec/helpers/ctrl_c_support.rb
activefacts-0.8.12 spec/helpers/ctrl_c_support.rb
activefacts-0.8.10 spec/helpers/ctrl_c_support.rb
activefacts-0.8.9 spec/helpers/ctrl_c_support.rb
activefacts-0.8.8 spec/helpers/ctrl_c_support.rb