Sha256: 6037b74e42d758b1f756bc1d5773b45fafff508e619a3286690bdf7600db4e4d

Contents?: true

Size: 1.1 KB

Versions: 182

Compression:

Stored size: 1.1 KB

Contents

module RSpec
  module Core
    class CommandLine
      def initialize(options, configuration=RSpec::configuration, world=RSpec::world)
        if Array === options
          options = ConfigurationOptions.new(options)
          options.parse_options
        end
        @options       = options
        @configuration = configuration
        @world         = world
      end

      # Configures and runs a suite
      #
      # @param [IO] err
      # @param [IO] out
      def run(err, out)
        @configuration.error_stream = err
        @configuration.output_stream ||= out
        @options.configure(@configuration)
        @configuration.load_spec_files
        @world.announce_filters

        @configuration.reporter.report(@world.example_count, @configuration.randomize? ? @configuration.seed : nil) do |reporter|
          begin
            @configuration.run_hook(:before, :suite)
            @world.example_groups.ordered.map {|g| g.run(reporter)}.all? ? 0 : @configuration.failure_exit_code
          ensure
            @configuration.run_hook(:after, :suite)
          end
        end
      end
    end
  end
end

Version data entries

182 entries across 129 versions & 25 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb
classiccms-0.7.5 vendor/bundle/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb
classiccms-0.7.5 vendor/bundle/gems/rspec-core-2.10.0/lib/rspec/core/command_line.rb
classiccms-0.7.4 vendor/bundle/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb
classiccms-0.7.4 vendor/bundle/gems/rspec-core-2.10.0/lib/rspec/core/command_line.rb
classiccms-0.7.3 vendor/bundle/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb
classiccms-0.7.3 vendor/bundle/gems/rspec-core-2.10.0/lib/rspec/core/command_line.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-core-2.13.0/lib/rspec/core/command_line.rb
dxruby_rp5-0.0.4 spec/vendor/rspec-core-2.14.7/lib/rspec/core/command_line.rb
rspec-core-2.14.8 lib/rspec/core/command_line.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb