Skip to content
Snippets Groups Projects
Verified Commit bc31a957 authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Introduce new :sidekiq_inline{,_tech_debt} RSpec tags


Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 7c570cbe
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !15479. Comments created here will be created in the context of that merge request.
......@@ -27,7 +27,9 @@ def call(worker_instance, msg, queue)
end
RSpec.configure do |config|
config.after(:each, :sidekiq) do
config.around(:each, :sidekiq) do |example|
Sidekiq::Worker.clear_all
example.run
Sidekiq::Worker.clear_all
end
......@@ -36,4 +38,19 @@ def call(worker_instance, msg, queue)
connection.redis.flushdb
end
end
# As we'll review the examples with this tag, we should either:
# - fix the example to not require Sidekiq inline mode (and remove this tag)
# - explicitly keep the inline mode and change the tag for `:sidekiq_inline` instead
config.around(:example, :sidekiq_might_not_need_inline) do |example|
Sidekiq::Worker.clear_all
Sidekiq::Testing.inline! { example.run }
Sidekiq::Worker.clear_all
end
config.around(:example, :sidekiq_inline) do |example|
Sidekiq::Worker.clear_all
Sidekiq::Testing.inline! { example.run }
Sidekiq::Worker.clear_all
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment