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:
parent
3452efaf0b
commit
925b80e85e
1 changed files with 8 additions and 0 deletions
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue