Method: Inspec::RunnerRspec#run

Defined in:
lib/inspec/runner_rspec.rb

#run(with = nil) ⇒ int

Run all registered tests with an optional test runner.

Parameters:

  • with (RSpecRunner) (defaults to: nil)

    is an optional RSpecRunner

Returns:

  • (int)

    0 if all went well; otherwise nonzero



73
74
75
76
77
# File 'lib/inspec/runner_rspec.rb', line 73

def run(with = nil)
  with ||= RSpec::Core::Runner.new(nil)
  @rspec_exit_code = with.run_specs(tests)
  @formatter.results
end