Class: RSpec::Core::CommandLine

Inherits:
Runner
  • Object
show all
Defined in:
lib/rspec/core/command_line.rb

Constant Summary

Constant Summary

Constants inherited from Runner

Runner::AT_EXIT_HOOK_BACKTRACE_LINE

Instance Method Summary (collapse)

Methods inherited from Runner

autorun, autorun_disabled?, disable_autorun!, installed_at_exit?, run, #run, running_in_drb?, trap_interrupt

Constructor Details

- (CommandLine) initialize(options, configuration = RSpec.configuration, world = RSpec.world)

A new instance of CommandLine

33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/rspec/core/command_line.rb', line 33
def initialize(options, configuration=RSpec.configuration, world=RSpec.world)
  if Array === options
    RSpec.deprecate("Instantiating a `RSpec::Core::CommandLine` with an array of options",
                    :replacement => "Instantiate a `RSpec::Core::Runner` with a `RSpec::Core::ConfigurationOptions` instance")
    options = ConfigurationOptions.new(options)
    options.parse_options
  else
    RSpec.deprecate("`RSpec::Core::CommandLine`", :replacement => "`RSpec::Core::Runner`")
  end
  super
end