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

restore env vars to original values after these tests

This commit is contained in:
Charlie Somerville 2014-06-08 13:43:22 +10:00
parent 3452efaf0b
commit 925b80e85e

View file

@ -70,6 +70,14 @@ class TestRedisConnection < Sidekiq::Test
describe ".determine_redis_provider" do
before do
@old_env = ENV.to_h
end
after do
ENV.update(@old_env)
end
def with_env_var(var, uri, skip_provider=false)
vars = ['REDISTOGO_URL', 'REDIS_PROVIDER', 'REDIS_URL'] - [var]
vars.each do |v|