Sha256: ada499035a2a3478f81c8cd5934097ff9eb0316d1d7b2756832499fbd84da7c8

Contents?: true

Size: 1.01 KB

Versions: 13

Compression:

Stored size: 1.01 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

      def run(err, out)
        @configuration.error_stream = err
        @configuration.output_stream ||= out
        @options.configure(@configuration)
        @configuration.load_spec_files
        @configuration.configure_mock_framework
        @world.announce_inclusion_filter
        @world.announce_exclusion_filter

        @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

13 entries across 13 versions & 2 rubygems

Version Path
rspec-core-2.0.1 lib/rspec/core/command_line.rb
gemrage-1.0.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/command_line.rb
gemrage-0.4.1 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/command_line.rb
gemrage-0.4.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/command_line.rb
gemrage-0.3.2 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/command_line.rb
gemrage-0.3.1 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/command_line.rb
gemrage-0.3.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/command_line.rb
gemrage-0.2.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/command_line.rb
gemrage-0.1.2 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/command_line.rb
gemrage-0.1.1 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/command_line.rb
gemrage-0.1.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/command_line.rb
gemrage-0.0.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/command_line.rb
rspec-core-2.0.0 lib/rspec/core/command_line.rb