From 925b80e85e9392daf2a4ad3aa8ffd7af101a7e85 Mon Sep 17 00:00:00 2001 From: Charlie Somerville Date: Sun, 8 Jun 2014 13:43:22 +1000 Subject: [PATCH] restore env vars to original values after these tests --- test/test_redis_connection.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test_redis_connection.rb b/test/test_redis_connection.rb index fdbcc1eb..f236a328 100644 --- a/test/test_redis_connection.rb +++ b/test/test_redis_connection.rb @@ -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|