Sha256: 243176e493e7b9408057ce7ed2268892f7a8e340729da2600c3e8f5e58b5264a

Contents?: true

Size: 934 Bytes

Versions: 3

Compression:

Stored size: 934 Bytes

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

      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) do |reporter|
          begin
            @configuration.run_hook(:before, :suite)
            @world.example_groups.map {|g| g.run(reporter)}.all?
          ensure
            @configuration.run_hook(:after, :suite)
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rspec-core-2.6.0.rc6 lib/rspec/core/command_line.rb
rspec-core-2.6.0.rc4 lib/rspec/core/command_line.rb
rspec-core-2.6.0.rc2 lib/rspec/core/command_line.rb