Sha256: 3ec4c89087f7c295e6d3c791fd1edf60412a3a2e6ddc51ffb168f20afd21382e
Contents?: true
Size: 771 Bytes
Versions: 1
Compression:
Stored size: 771 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspeckled-0.0.31 | lib/rspeckled/plugins/sidekiq.rb |