Sha256: fd9fa6ad057d8dabd6db2c933d1d6c73dbc6e066a0d2915a5a255ab7e3260d9a

Contents?: true

Size: 516 Bytes

Versions: 8

Compression:

Stored size: 516 Bytes

Contents

module Kernel
  def context(name, &block)
    context = Spec::Runner::Context.new(name, &block)
    context_runner.add_context(context)
  end

private

  def context_runner
    # TODO: Figure out a better way to get this considered "covered" and keep this statement on multiple lines 
    unless $context_runner; \
      $context_runner = ::Spec::Runner::OptionParser.new.create_context_runner(ARGV.dup, STDERR, STDOUT, false); \
      at_exit { $context_runner.run(false) }; \
    end
    $context_runner
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
puppet-0.22.4 test/lib/spec/runner/extensions/kernel.rb
puppet-0.23.0 test/lib/spec/runner/extensions/kernel.rb
puppet-0.23.1 test/lib/spec/runner/extensions/kernel.rb
puppet-0.23.2 test/lib/spec/runner/extensions/kernel.rb
riess-0.0.8 vendor/rspec-0.8.2/lib/spec/runner/extensions/kernel.rb
rspec-0.8.1 lib/spec/runner/extensions/kernel.rb
rspec-0.8.0 lib/spec/runner/extensions/kernel.rb
rspec-0.8.2 lib/spec/runner/extensions/kernel.rb