2019-04-01 12:20:41 -04:00
|
|
|
require "bundler/gem_tasks"
|
|
|
|
require "rake/testtask"
|
|
|
|
require "standard/rake"
|
2018-12-07 11:59:42 -05:00
|
|
|
|
2012-01-21 19:42:21 -05:00
|
|
|
Rake::TestTask.new(:test) do |test|
|
2016-11-23 17:50:11 -05:00
|
|
|
test.warning = true
|
2019-04-01 12:20:41 -04:00
|
|
|
test.pattern = "test/**/test_*.rb"
|
2012-01-21 19:42:21 -05:00
|
|
|
end
|
|
|
|
|
2022-05-10 15:25:04 -04:00
|
|
|
namespace :test do
|
|
|
|
task :redis_client do
|
|
|
|
previous = ENV["SIDEKIQ_REDIS_CLIENT"]
|
|
|
|
ENV["SIDEKIQ_REDIS_CLIENT"] = "1"
|
|
|
|
Rake::Task[:test].execute
|
|
|
|
ensure
|
|
|
|
if previous
|
|
|
|
ENV["SIDEKIQ_REDIS_CLIENT"] = previous
|
|
|
|
else
|
|
|
|
ENV.delete("SIDEKIQ_REDIS_CLIENT")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
task default: [:standard, :test, "test:redis_client"]
|