Sha256: 5cccc0595151623caa6642df53ef5bd78e33948044a667027dd8f8bff3e7da97

Contents?: true

Size: 1.06 KB

Versions: 36

Compression:

Stored size: 1.06 KB

Contents

require 'spec/runner/option_parser'

module Spec
  module Runner
    # Facade to run specs without having to fork a new ruby process (using `spec ...`)
    class CommandLine
      class << self
        # Runs specs. +argv+ is the commandline args as per the spec commandline API, +err+
        # and +out+ are the streams output will be written to.
        def run(instance_rspec_options)
          # NOTE - this call to init_rspec_options is not spec'd, but neither is any of this
          # swapping of $rspec_options. That is all here to enable rspec to run against itself
          # and maintain coverage in a single process. Therefore, DO NOT mess with this stuff
          # unless you know what you are doing!
          init_rspec_options(instance_rspec_options)
          orig_rspec_options = rspec_options
          begin
            $rspec_options = instance_rspec_options
            return $rspec_options.run_examples
          ensure
            ::Spec.run = true
            $rspec_options = orig_rspec_options
          end
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 5 rubygems

Version Path
picolena-0.0.99 app_generators/picolena/templates/vendor/plugins/rspec/lib/spec/runner/command_line.rb
picolena-0.1.0 rails_plugins/rspec/lib/spec/runner/command_line.rb
picolena-0.1.1 rails_plugins/rspec/lib/spec/runner/command_line.rb
picolena-0.1.4 rails_plugins/rspec/lib/spec/runner/command_line.rb
picolena-0.1.3 rails_plugins/rspec/lib/spec/runner/command_line.rb
picolena-0.1.2 rails_plugins/rspec/lib/spec/runner/command_line.rb
picolena-0.1.5 rails_plugins/rspec/lib/spec/runner/command_line.rb
picolena-0.1.6 rails_plugins/rspec/lib/spec/runner/command_line.rb
picolena-0.1.7 rails_plugins/rspec/lib/spec/runner/command_line.rb
picolena-0.1.8 rails_plugins/rspec/lib/spec/runner/command_line.rb
radiant-0.6.5.1 vendor/plugins/rspec/lib/spec/runner/command_line.rb
radiant-0.6.5 vendor/plugins/rspec/lib/spec/runner/command_line.rb
radiant-0.6.7 vendor/plugins/rspec/lib/spec/runner/command_line.rb
radiant-0.6.6 vendor/plugins/rspec/lib/spec/runner/command_line.rb
radiant-0.6.8 vendor/plugins/rspec/lib/spec/runner/command_line.rb
radiant-0.6.9 vendor/plugins/rspec/lib/spec/runner/command_line.rb
rspec-0.0.10 lib/spec/runner/command_line.rb
rspec-1.1.1 lib/spec/runner/command_line.rb
rspec-1.1.0 lib/spec/runner/command_line.rb
rspec-1.1.4 lib/spec/runner/command_line.rb