Sha256: 3871dcadaab3f849de3e8e5f3a911fb428f1222568a34ad71744c00d7e94bcd7
Contents?: true
Size: 1002 Bytes
Versions: 2
Compression:
Stored size: 1002 Bytes
Contents
require 'fakeredis/rspec' require 'sidekiq' require 'sidekiq/testing' require 'simplecov' SimpleCov.start do add_filter "vendor" add_filter "spec" end require 'sidekiq-apriori/priorities' redis = { :url => "redis://localhost:6379/0", :driver => Redis::Connection::Memory } Sidekiq.configure_client { |config| config.redis = redis } Sidekiq.configure_server do |config| config.redis = redis # require 'support/tracked_fetch' # Sidekiq.options[:fetch] = TrackedFetch end RSpec.configure do |config| config.before(:each) do ## Use metadata to determine testing behavior ## for queuing. Sidekiq::Worker.clear_all case example.metadata[:queuing].to_s when 'enable', 'enabled', 'on', 'true' Sidekiq::Testing.disable! when 'fake', 'mock' Sidekiq::Testing.fake! when 'inline' Sidekiq::Testing.inline! else defined?(Redis::Connection::Memory) ? Sidekiq::Testing.disable! : Sidekiq::Testing.inline! end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sidekiq-apriori-0.0.3 | spec/spec_helper.rb |
sidekiq-apriori-0.0.2 | spec/spec_helper.rb |