1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/test/helper.rb

40 lines
812 B
Ruby
Raw Normal View History

$TESTING = true
2013-03-13 17:16:47 -04:00
require 'coveralls'
Coveralls.wear! do
add_filter "/test/"
add_filter "/myapp/"
2013-03-13 17:16:47 -04:00
end
ENV['RACK_ENV'] = ENV['RAILS_ENV'] = 'test'
if ENV.has_key?("SIMPLECOV")
2012-01-24 01:07:21 -05:00
require 'simplecov'
2013-04-12 16:57:24 -04:00
SimpleCov.start do
add_filter "/test/"
add_filter "/myapp/"
2013-04-12 16:57:24 -04:00
end
2012-01-24 01:07:21 -05:00
end
2012-11-01 19:08:27 -04:00
begin
require 'pry-byebug'
2012-11-01 19:08:27 -04:00
rescue LoadError
end
2012-09-04 01:38:45 -04:00
2012-01-21 19:42:21 -05:00
require 'minitest/autorun'
2013-05-12 17:25:30 -04:00
require 'minitest/pride'
require 'celluloid/test'
Celluloid.boot
require 'sidekiq'
require 'sidekiq/util'
Sidekiq.logger.level = Logger::ERROR
Sidekiq::Test = Minitest::Test
require 'sidekiq/redis_connection'
2014-06-07 23:44:35 -04:00
REDIS_URL = ENV['REDIS_URL'] || 'redis://localhost/15'
REDIS = Sidekiq::RedisConnection.create(:url => REDIS_URL, :namespace => 'testy')
Sidekiq.configure_client do |config|
2014-06-07 23:44:35 -04:00
config.redis = { :url => REDIS_URL, :namespace => 'testy' }
end