diff --git a/test/helper.rb b/test/helper.rb index 433b9862..4d1f0d17 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -25,4 +25,9 @@ require 'sidekiq/util' Sidekiq.logger.level = Logger::ERROR require 'sidekiq/redis_connection' -REDIS = Sidekiq::RedisConnection.create(:url => "redis://localhost/15", :namespace => 'testy') +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