spec/spec_helper.rb in sidekiq-bus-0.5.2 vs spec/spec_helper.rb in sidekiq-bus-0.5.3

- old
+ new

@@ -1,11 +1,17 @@ require 'timecop' require 'queue-bus' require 'adapter/support' +require 'pry' reset_test_adapter +require 'fakeredis' +Sidekiq.redis = ConnectionPool.new { Redis.new(driver: Redis::Connection::Memory) } + +require 'sidekiq/testing' + module QueueBus class Runner def self.value @value ||= 0 end @@ -45,18 +51,24 @@ end out end RSpec.configure do |config| + + config.run_all_when_everything_filtered = true + config.filter_run focus: true + config.alias_example_to :fit, focus: true + config.mock_with :rspec do |c| c.syntax = :should end config.expect_with :rspec do |c| c.syntax = :should end config.before(:each) do reset_test_adapter + Sidekiq::Testing.disable! end config.after(:each) do begin QueueBus.redis { |redis| redis.flushall } rescue