Sha256: 23334011a82db99a352fb565fe726f99c0e3a686c1ea71ec616b6932097e69a7

Contents?: true

Size: 973 Bytes

Versions: 11

Compression:

Stored size: 973 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? ? 0 : @configuration.failure_exit_code
          ensure
            @configuration.run_hook(:after, :suite)
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
horseman-0.0.4 vendor/ruby/1.9.1/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb
horseman-0.0.3 vendor/ruby/1.9.1/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb
horseman-0.0.2 vendor/ruby/1.9.1/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb
nutshell-crm-0.0.6.alpha vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb
nutshell-crm-0.0.5 vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb
nutshell-crm-0.0.4 vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb
nutshell-crm-0.0.3 vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb
nutshell-crm-0.0.2 vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb
nutshell-crm-0.0.1 vendor/bundle/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb
rspec-core-2.7.1 lib/rspec/core/command_line.rb
rspec-core-2.7.0 lib/rspec/core/command_line.rb