Sha256: 893b21fb2c16bc13e76627072bc6fdf0f89f9c830296340fd98d5e136d7ad28e
Contents?: true
Size: 770 Bytes
Versions: 11
Compression:
Stored size: 770 Bytes
Contents
# frozen_string_literal: true begin require 'sidekiq/testing' RSpec.configure do |config| config.before(:each, :queue => lambda { |v| !!v }) do |example| # Clears out the jobs for tests using the fake testing Sidekiq::Worker.clear_all Sidekiq::Queues.clear_all Sidekiq.redis(&:flushdb) Sidekiq.redis do |client| client.keys.each do |key| client.del(key) end end if example.metadata[:queue] == :stub Sidekiq::Testing.fake! elsif example.metadata[:queue] == :immediately_execute Sidekiq::Testing.inline! elsif example.metadata[:type] == :feature Sidekiq::Testing.inline! else Sidekiq::Testing.fake! end end end rescue LoadError end
Version data entries
11 entries across 11 versions & 1 rubygems