Module: Spec::Runner

Defined in:
lib/spec/runner.rb,
lib/spec/runner/options.rb,
lib/spec/runner/reporter.rb,
lib/spec/runner/spec_parser.rb,
lib/spec/runner/command_line.rb,
lib/spec/runner/configuration.rb,
lib/spec/runner/heckle_runner.rb,
lib/spec/runner/option_parser.rb,
lib/spec/runner/drb_command_line.rb,
lib/spec/runner/backtrace_tweaker.rb,
lib/spec/runner/example_group_runner.rb,
lib/spec/runner/formatter/base_formatter.rb,
lib/spec/runner/formatter/html_formatter.rb,
lib/spec/runner/heckle_runner_unsupported.rb,
lib/spec/runner/class_and_arguments_parser.rb,
lib/spec/runner/formatter/profile_formatter.rb,
lib/spec/runner/formatter/snippet_extractor.rb,
lib/spec/runner/formatter/specdoc_formatter.rb,
lib/spec/runner/formatter/base_text_formatter.rb,
lib/spec/runner/formatter/text_mate_formatter.rb,
lib/spec/runner/formatter/nested_text_formatter.rb,
lib/spec/runner/formatter/progress_bar_formatter.rb,
lib/spec/runner/formatter/failing_examples_formatter.rb,
lib/spec/runner/formatter/failing_example_groups_formatter.rb

Defined Under Namespace

Modules: Formatter Classes: BacktraceTweaker, BehaviourRunner, ClassAndArgumentsParser, CommandLine, Configuration, DrbCommandLine, ExampleGroupCreationListener, ExampleGroupRunner, HeckleRunner, Heckler, NoisyBacktraceTweaker, OptionParser, Options, QuietBacktraceTweaker, Reporter, SpecParser

Class Method Summary collapse

Class Method Details

.autorunObject

:nodoc:



43
44
45
# File 'lib/spec/runner.rb', line 43

def autorun # :nodoc:
  at_exit {exit run unless $!}
end

.configurationObject

:nodoc:



24
25
26
# File 'lib/spec/runner.rb', line 24

def configuration # :nodoc:
  @configuration ||= Spec::Runner::Configuration.new
end

.configure {|configuration| ... } ⇒ Object

Use this to configure various configurable aspects of RSpec:

Spec::Runner.configure do |configuration|
  # Configure RSpec here
end

The yielded configuration object is a Spec::Runner::Configuration instance. See its RDoc for details about what you can do with it.

Yields:



39
40
41
# File 'lib/spec/runner.rb', line 39

def configure
  yield configuration
end

.optionsObject

:nodoc:



47
48
49
50
51
52
53
# File 'lib/spec/runner.rb', line 47

def options # :nodoc:
  @options ||= begin
    parser = ::Spec::Runner::OptionParser.new($stderr, $stdout)
    parser.order!(ARGV)
    parser.options
  end
end

.runObject



59
60
61
62
# File 'lib/spec/runner.rb', line 59

def run
  return true if options.examples_run?
  options.run_examples
end

.use(options) ⇒ Object



55
56
57
# File 'lib/spec/runner.rb', line 55

def use options
  @options = options
end