Class: RSpec::Core::ConfigurationOptions

### Home Classes Methods

### In Files

- lib/rspec/core/configuration_options.rb

### Parent

Object

### Methods

- ::new
- #configure
- #drb_argv
- #filter_manager
- #parse_options

### Class/Module Index

Quicksearch

- RSpec
- RSpec::Core
- RSpec::Core::BacktraceCleaner
- RSpec::Core::BacktraceFormatter
- RSpec::Core::CommandLine
- RSpec::Core::Configuration
- RSpec::Core::Configuration::MustBeConfiguredBeforeExampleGroupsError
- RSpec::Core::ConfigurationOptions
- RSpec::Core::ConstMissing
- RSpec::Core::DRbCommandLine
- RSpec::Core::DSL
- RSpec::Core::Deprecation
- RSpec::Core::DrbOptions
- RSpec::Core::Example
- RSpec::Core::Example::NotPendingExampleFixed
- RSpec::Core::Example::Procsy
- RSpec::Core::ExampleGroup
- RSpec::Core::Extensions
- RSpec::Core::Extensions::InstanceEvalWithArgs
- RSpec::Core::Extensions::ModuleEvalWithArgs
- RSpec::Core::Extensions::Ordered
- RSpec::Core::Extensions::Ordered::ExampleGroups
- RSpec::Core::Extensions::Ordered::Examples
- RSpec::Core::FilterManager
- RSpec::Core::FilterManager::BackwardCompatibility
- RSpec::Core::FilterManager::Describable
- RSpec::Core::Formatters
- RSpec::Core::Formatters::BaseFormatter
- RSpec::Core::Formatters::BaseTextFormatter
- RSpec::Core::Formatters::DeprecationFormatter
- RSpec::Core::Formatters::DocumentationFormatter
- RSpec::Core::Formatters::Helpers
- RSpec::Core::Formatters::HtmlFormatter
- RSpec::Core::Formatters::HtmlPrinter
- RSpec::Core::Formatters::JsonFormatter
- RSpec::Core::Formatters::ProgressFormatter
- RSpec::Core::Formatters::SnippetExtractor
- RSpec::Core::Formatters::SnippetExtractor::NullConverter
- RSpec::Core::Formatters::TextMateFormatter
- RSpec::Core::Hooks
- RSpec::Core::Hooks::AfterAllHook
- RSpec::Core::Hooks::AfterHook
- RSpec::Core::Hooks::AroundHook
- RSpec::Core::Hooks::AroundHookCollection
- RSpec::Core::Hooks::BeforeHook
- RSpec::Core::Hooks::GroupHookCollection
- RSpec::Core::Hooks::Hook
- RSpec::Core::Hooks::HookCollection
- RSpec::Core::Hooks::HookCollectionAliases
- RSpec::Core::Hooks::RegistersGlobals
- RSpec::Core::MemoizedHelpers
- RSpec::Core::MemoizedHelpers::BeforeAllMemoizedHash
- RSpec::Core::MemoizedHelpers::ClassMethods
- RSpec::Core::Metadata
- RSpec::Core::Metadata::ExampleMetadataHash
- RSpec::Core::Metadata::GroupMetadataHash
- RSpec::Core::Metadata::MetadataHash
- RSpec::Core::MetadataHashBuilder
- RSpec::Core::MetadataHashBuilder::Common
- RSpec::Core::MetadataHashBuilder::WithConfigWarning
- RSpec::Core::MetadataHashBuilder::WithDeprecationWarning
- RSpec::Core::MockFrameworkAdapter
- RSpec::Core::Parser
- RSpec::Core::Pending
- RSpec::Core::Pending::PendingDeclaredInExample
- RSpec::Core::Pending::PendingExampleFixedError
- RSpec::Core::ProjectInitializer
- RSpec::Core::RakeTask
- RSpec::Core::Reporter
- RSpec::Core::RubyProject
- RSpec::Core::Runner
- RSpec::Core::SharedContext
- RSpec::Core::SharedExampleGroup
- RSpec::Core::SharedExampleGroup::Collection
- RSpec::Core::SharedExampleGroup::Registry
- RSpec::Core::SharedExampleGroup::TopLevelDSL
- RSpec::Core::Time
- RSpec::Core::Version
- RSpec::Core::World
- RSpec::Rake
- RSpec::Runner
- Autotest
- Autotest::Rspec2
- Kernel

No matching classes.

# RSpec::Core::ConfigurationOptions

@private

### Constants

MERGED_OPTIONS
NON_FORCED_OPTIONS
UNPROCESSABLE_OPTIONS

### Attributes

options[R]

### Public Class Methods

new(args) click to toggle source

    # File lib/rspec/core/configuration_options.rb, line 10
    def initialize(args)
      @args = args.dup
      if @args.include?("--default_path")
        @args[@args.index("--default_path")] = "--default-path"
      end

      if @args.include?("--line_number")
        @args[@args.index("--line_number")] = "--line-number"
      end
    end

### Public Instance Methods

configure(config) click to toggle source

    # File lib/rspec/core/configuration_options.rb, line 21
    def configure(config)
      config.filter_manager = filter_manager

      config.libs = options[:libs] || []
      config.setup_load_path_and_require(options[:requires] || [])

      process_options_into config
      load_formatters_into config
    end

drb_argv() click to toggle source

    # File lib/rspec/core/configuration_options.rb, line 39
    def drb_argv
      DrbOptions.new(options, filter_manager).options
    end

filter_manager() click to toggle source

    # File lib/rspec/core/configuration_options.rb, line 43
    def filter_manager
      @filter_manager ||= RSpec::configuration.filter_manager
    end

parse_options() click to toggle source

    # File lib/rspec/core/configuration_options.rb, line 31
    def parse_options
      @options ||= extract_filters_from(*all_configs).inject do |merged, pending|
        merged.merge(pending) { |key, oldval, newval|
          MERGED_OPTIONS.include?(key) ? oldval + newval : newval
        }
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.