test/lib/middleware_test.rb in sidekiq-lock-0.5.0 vs test/lib/middleware_test.rb in sidekiq-lock-0.6.0

- old
+ new

@@ -2,10 +2,16 @@ module Sidekiq module Lock describe Middleware do before do - Sidekiq.redis = REDIS + if Sidekiq::VERSION >= '7' + Sidekiq.configure_server do |config| + config.redis = { url: REDIS_URL } + end + else + Sidekiq.redis = REDIS + end Sidekiq.redis { |c| c.flushdb } reset_lock_variable! end let(:handler) { Sidekiq::Lock::Middleware.new }