Sha256: e01f7005a64bca71ba4e77c8db08bda62940f81c53e847c6d8b66cd91712d7d3

Contents?: true

Size: 1008 Bytes

Versions: 5

Compression:

Stored size: 1008 Bytes

Contents

$CELLULOID_DEBUG = false
$TESTING = true
if ENV["COVERAGE"]
  require 'simplecov'
  SimpleCov.start do
    add_filter "/test/"
    add_filter "/myapp/"
  end
end
ENV['RACK_ENV'] = ENV['RAILS_ENV'] = 'test'

begin
  require 'pry-byebug'
rescue LoadError
end

require 'minitest/autorun'
require 'minitest/pride'

require 'celluloid/current'
require 'celluloid/test'
Celluloid.boot
require 'sidekiq'
require 'sidekiq/util'
Sidekiq.logger.level = Logger::ERROR

Sidekiq::Test = Minitest::Test

require 'sidekiq/redis_connection'
REDIS_URL = ENV['REDIS_URL'] || 'redis://localhost/15'
REDIS = Sidekiq::RedisConnection.create(:url => REDIS_URL, :namespace => 'testy')

Sidekiq.configure_client do |config|
  config.redis = { :url => REDIS_URL, :namespace => 'testy' }
end

def capture_logging(lvl=Logger::INFO)
  old = Sidekiq.logger
  begin
    out = StringIO.new
    logger = Logger.new(out)
    logger.level = lvl
    Sidekiq.logger = logger
    yield
    out.string
  ensure
    Sidekiq.logger = old
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sidekiq-3.5.4 test/helper.rb
sidekiq-3.5.3 test/helper.rb
sidekiq-3.5.2 test/helper.rb
sidekiq-3.5.1 test/helper.rb
sidekiq-3.5.0 test/helper.rb