summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-03 15:08:33 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-03 15:08:33 +0000
commit511e761b41b81484c85e3d125f45873ce38e9201 (patch)
tree6bb98a6356de6e1d736951d2eef6ec83e6aa3dd2 /spec/spec_helper.rb
parent4247e67be1faa9d52691757dad954a7fa63e8bfe (diff)
downloadgitlab-ce-511e761b41b81484c85e3d125f45873ce38e9201.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 1f0119108a8..6393e482904 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -245,6 +245,12 @@ RSpec.configure do |config|
Rails.cache = caching_store
end
+ config.around do |example|
+ # Wrap each example in it's own context to make sure the contexts don't
+ # leak
+ Labkit::Context.with_context { example.run }
+ end
+
config.around(:each, :clean_gitlab_redis_cache) do |example|
redis_cache_cleanup!