Class: RSpec::Parallel::Worker::SpecRunner
- Inherits:
-
Core::Runner
- Object
- Core::Runner
- RSpec::Parallel::Worker::SpecRunner
- Defined in:
- lib/rspec/parallel/worker.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ SpecRunner
constructor
A new instance of SpecRunner.
-
#run_specs(example_groups) ⇒ Integer
Exit status code.
Constructor Details
#initialize(args) ⇒ SpecRunner
Returns a new instance of SpecRunner.
92 93 94 95 |
# File 'lib/rspec/parallel/worker.rb', line 92 def initialize(args) = RSpec::Core::ConfigurationOptions.new(args) super() end |
Instance Method Details
#run_specs(example_groups) ⇒ Integer
Returns exit status code.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/rspec/parallel/worker.rb', line 99 def run_specs(example_groups) # Reset filter manager to run all specs. Just for simplicity # TODO: Support config.run_all_when_everything_filtered = true @configuration.filter_manager = RSpec::Core::FilterManager.new success = @configuration.reporter.report(0) do |reporter| @configuration.with_suite_hooks do example_groups.map do |g| RSpec::Parallel.configuration.logger.info("Run #{g.inspect}") g.run(reporter) end.all? end end && !@world.non_example_failure success ? 0 : @configuration.failure_exit_code end |