1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00
sinatra/test/integration_async_helper.rb
Olle Jonsson 1559a20b06 refactor: use __dir__ in File.expand_path
__dir__ is nice, and available.
2022-02-02 15:58:11 -05:00

14 lines
429 B
Ruby

require File.expand_path('integration_helper', __dir__)
module IntegrationAsyncHelper
def it(message, &block)
base_port = 5100 + Process.pid % 100
%w(rainbows).each_with_index do |server_name, index|
server = IntegrationHelper::BaseServer.new(server_name, base_port + index)
next unless server.installed?
super("with #{server.name}: #{message}") { server.run_test(self, &block) }
end
end
end