diff --git a/lib/rspec_queue/server_runner.rb b/lib/rspec_queue/server_runner.rb index 640dd5e..bf42ef5 100644 --- a/lib/rspec_queue/server_runner.rb +++ b/lib/rspec_queue/server_runner.rb @@ -28,7 +28,13 @@ def run_specs(example_groups) reporter.report(0) do |report| @configuration.with_suite_hooks do server.dispatch(example_group_hash, report) - [report.failed_examples.count, 1].min # exit status + + # Exit status + if @configuration.world.non_example_failure + 1 + else + [report.failed_examples.count, 1].min + end end end ensure