Module: Spec::Runner

Defined in:
lib/vendor/plugins/rspec/lib/spec/runner.rb,
lib/vendor/plugins/rspec/lib/spec/runner/options.rb,
lib/vendor/plugins/rspec/lib/spec/runner/reporter.rb,
lib/vendor/plugins/rspec/lib/spec/runner/command_line.rb,
lib/vendor/plugins/rspec/lib/spec/runner/configuration.rb,
lib/vendor/plugins/rspec/lib/spec/runner/heckle_runner.rb,
lib/vendor/plugins/rspec/lib/spec/runner/option_parser.rb,
lib/vendor/plugins/rspec/spec/spec/runner/options_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/reporter_spec.rb,
lib/vendor/plugins/rspec/lib/spec/runner/drb_command_line.rb,
lib/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb,
lib/vendor/plugins/rspec/lib/spec/runner/line_number_query.rb,
lib/vendor/plugins/rspec/spec/spec/runner/command_line_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/configuration_spec.rb,
lib/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb,
lib/vendor/plugins/rspec/spec/spec/runner/output_one_time_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/drb_command_line_spec.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb,
lib/vendor/plugins/rspec/lib/spec/runner/heckle_runner_unsupported.rb,
lib/vendor/plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/silent_formatter.rb,
lib/vendor/plugins/rspec/spec/spec/runner/example_group_runner_spec.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/profile_formatter.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/snippet_extractor.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/text_mate_formatter.rb,
lib/vendor/plugins/rspec/spec/spec/runner/noisy_backtrace_tweaker_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/quiet_backtrace_tweaker_spec.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/no_op_method_missing.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/base_formatter_spec.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/nested_text_formatter.rb,
lib/vendor/plugins/rspec/spec/spec/runner/class_and_argument_parser_spec.rb,
lib/vendor/plugins/rspec-rails/spec/spec/rails/example/configuration_spec.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/progress_bar_formatter.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/profile_formatter_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/snippet_extractor_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/specdoc_formatter_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/base_text_formatter_spec.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/failing_examples_formatter.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/nested_text_formatter_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_spec.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/extensions/spec/runner/configuration.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/failing_example_groups_formatter.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/failing_examples_formatter_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb

Defined Under Namespace

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

Class Method Summary collapse

Class Method Details

.autorunObject

:nodoc:



44
45
46
# File 'lib/vendor/plugins/rspec/lib/spec/runner.rb', line 44

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

.configurationObject

:nodoc:



25
26
27
# File 'lib/vendor/plugins/rspec/lib/spec/runner.rb', line 25

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:



40
41
42
# File 'lib/vendor/plugins/rspec/lib/spec/runner.rb', line 40

def configure
  yield configuration
end

.optionsObject

:nodoc:



48
49
50
51
52
53
54
# File 'lib/vendor/plugins/rspec/lib/spec/runner.rb', line 48

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

.runObject



60
61
62
# File 'lib/vendor/plugins/rspec/lib/spec/runner.rb', line 60

def run
  options.examples_run? || options.run_examples
end

.use(options) ⇒ Object



56
57
58
# File 'lib/vendor/plugins/rspec/lib/spec/runner.rb', line 56

def use options
  @options = options
end