Sha256: cb2ccd2316bf1886d55d4d0f74a96dd4a5db9a42fac212f01a6ef11f775e9446

Contents?: true

Size: 678 Bytes

Versions: 6

Compression:

Stored size: 678 Bytes

Contents

require 'spec/version'
require 'spec/matchers'
require 'spec/expectations'
require 'spec/example'
require 'spec/extensions'
require 'spec/runner'

if Object.const_defined?(:Test); \
  require 'spec/interop/test'; \
end

module Spec
  class << self
    def run?
      @run || rspec_options.examples_run?
    end

    def run; \
      return true if run?; \
      result = rspec_options.run_examples; \
      @run = true; \
      result; \
    end
    attr_writer :run
    
    def exit?; \
      !Object.const_defined?(:Test) || Test::Unit.run?; \
    end
  end
end

at_exit do \
  unless $! || Spec.run?; \
    success = Spec.run; \
    exit success if Spec.exit?; \
  end \
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
rspec-1.1.1 lib/spec.rb
rspec-1.1.0 lib/spec.rb
rspec-1.1.2 lib/spec.rb
typo-5.0.2 vendor/plugins/rspec/lib/spec.rb
typo-5.0.1 vendor/plugins/rspec/lib/spec.rb
typo-5.0 vendor/plugins/rspec/lib/spec.rb