Sha256: 1b39acf83f364d22565002c1f80903c86c06a339b0503941c568d2a0e37aa13a
Contents?: true
Size: 891 Bytes
Versions: 34
Compression:
Stored size: 891 Bytes
Contents
begin require 'sidekiq/testing' RSpec.configure do |config| config.before(:each) do |example| # Clears out the jobs for tests using the fake testing Sidekiq::Worker.clear_all if example.metadata[:queue] == :stub Sidekiq::Testing.fake! elsif example.metadata[:queue] == :immediately_execute Sidekiq::Testing.inline! @redis_connection = Redis.new allow(Sidekiq::RedisConnection).to receive(:build_client). and_return(@redis_connection) elsif example.metadata[:type] == :feature Sidekiq::Testing.inline! @redis_connection = Redis.new allow(Sidekiq::RedisConnection).to receive(:build_client). and_return(@redis_connection) else Sidekiq::Testing.fake! end end end rescue LoadError end
Version data entries
34 entries across 34 versions & 2 rubygems