7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/rspec_queue/worker_runner.rb', line 7
def run_specs(example_groups)
example_group_hash = example_groups.map { |example_group|
[example_group.id, example_group]
}.to_h
RSpecQueue::Configuration.instance.server_socket = ENV["RSPEC_QUEUE_SERVER_ADDRESS"]
RSpecQueue::Configuration.call_after_worker_spawn_hooks(ENV["RSPEC_QUEUE_WORKER_ID"])
worker = RSpecQueue::Worker.new
@configuration.with_suite_hooks do
reporter = @configuration.reporter
while(worker.has_work?)
example_group_hash[worker.current_example].run(reporter)
end
worker.finish(reporter)
end
ensure
Process.exit
end
|