gitlab-org--gitlab-foss/spec/support/helpers/stub_worker.rb
João Cunha 4e5a9838fa Refactor subbed_worker calls
- Creates a support/helper file and moves all the duplication defs
into it
2019-03-28 15:50:47 +00:00

9 lines
233 B
Ruby

# Inspired by https://github.com/ljkbennett/stub_env/blob/master/lib/stub_env/helpers.rb
module StubWorker
def stub_worker(queue:)
Class.new do
include Sidekiq::Worker
sidekiq_options queue: queue
end
end
end