Commit 1cfc54a2 authored by Rémy Coutable's avatar Rémy Coutable

Introduce new :sidekiq_inline{,_tech_debt} RSpec tags

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 64a2badf
...@@ -27,7 +27,9 @@ Sidekiq::Testing.server_middleware do |chain| ...@@ -27,7 +27,9 @@ Sidekiq::Testing.server_middleware do |chain|
end end
RSpec.configure do |config| 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 Sidekiq::Worker.clear_all
end end
...@@ -36,4 +38,19 @@ RSpec.configure do |config| ...@@ -36,4 +38,19 @@ RSpec.configure do |config|
connection.redis.flushdb connection.redis.flushdb
end end
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 end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment