Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-06-27 13:18:54 +0300
committerRémy Coutable <remy@rymai.me>2017-06-27 13:18:54 +0300
commit7e9a52d05bf3378c5bb730fd54b4da4db1e705be (patch)
tree4fad7c7e20ccb75f95ce5e40176107a7e74096ea /spec
parentcefa4dc0cff29b5376a640b46978221fe8b0391a (diff)
parent1a47bd37a1bc4b33980ba0c97bae9ba54b8d2cfb (diff)
Merge branch 'sh-unset-stubenv' into 'master'
Reset the state of StubENV's @env_already_stubbed after each spec run See merge request !12438
Diffstat (limited to 'spec')
-rw-r--r--spec/support/stub_env.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/support/stub_env.rb b/spec/support/stub_env.rb
index 18597b5c71f..2999bcd9fb1 100644
--- a/spec/support/stub_env.rb
+++ b/spec/support/stub_env.rb
@@ -5,3 +5,11 @@ module StubENV
allow(ENV).to receive(:[]).with(key).and_return(value)
end
end
+
+# It's possible that the state of the class variables are not reset across
+# test runs.
+RSpec.configure do |config|
+ config.after(:each) do
+ @env_already_stubbed = nil
+ end
+end