From 577520b6376f5ad14aa343a2aba881e7e1ef1897 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 6 Feb 2024 07:49:48 -0500 Subject: [PATCH] Replace deprecated `Sidekiq::Testing` block style (#29097) --- spec/rails_helper.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index aaf587f49b2..51253390961 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -95,8 +95,13 @@ RSpec.configure do |config| self.use_transactional_tests = true end - config.around(:each, :sidekiq_inline) do |example| - Sidekiq::Testing.inline!(&example) + config.around do |example| + if example.metadata[:sidekiq_inline] == true + Sidekiq::Testing.inline! + else + Sidekiq::Testing.fake! + end + example.run end config.before :each, type: :cli do