Class Spec::Runner::CommandLine
In: lib/spec/runner/command_line.rb
Parent: Object

Facade to run specs without having to fork a new ruby process (using `spec …`)

Methods

run  

Public Class methods

Runs specs. argv is the commandline args as per the spec commandline API, err and out are the streams output will be written to. exit tells whether or not a system exit should be called after the specs are run and warn_if_no_files tells whether or not a warning (the help message) should be printed to err in case no files are specified.

[Source]

    # File lib/spec/runner/command_line.rb, line 12
12:       def self.run(argv, err, out, exit=true, warn_if_no_files=true)
13:         old_behaviour_runner = defined?($behaviour_runner) ? $behaviour_runner : nil
14:         $behaviour_runner = OptionParser.new.create_behaviour_runner(argv, err, out, warn_if_no_files)
15:         return if $behaviour_runner.nil? # This is the case if we use --drb
16: 
17:         $behaviour_runner.run(argv, exit)
18:         $behaviour_runner = old_behaviour_runner
19:       end

[Validate]