Skip to content

Commit

Permalink
Wrap #run_specs within @configuration.with_suite_hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoamaro committed Apr 22, 2020
1 parent 2a3039e commit 53aff4d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions lib/rspec_queue/worker_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@ def run_specs(example_groups)

worker = RSpecQueue::Worker.new

reporter = @configuration.reporter
@configuration.with_suite_hooks do
reporter = @configuration.reporter

while(worker.has_work?)
# can we pass in a custom reporter which instantly reports back
# to the server?
example_group_hash[worker.current_example].run(reporter)
end
while(worker.has_work?)
# can we pass in a custom reporter which instantly reports back
# to the server?
example_group_hash[worker.current_example].run(reporter)
end

# report the results of the examples run to the master process
worker.finish(reporter)
# report the results of the examples run to the master process
worker.finish(reporter)
end

ensure
Process.exit
Expand Down

0 comments on commit 53aff4d

Please sign in to comment.