summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2017-06-09 14:12:51 -0300
committerOswaldo Ferreira <oswaldo@gitlab.com>2017-06-09 18:18:36 -0300
commit34ba80392dd23614f60a759ec41b4df1f2915f49 (patch)
tree1ee3af3c41888aee4b196f6cf91f917e11176a21 /spec/spec_helper.rb
parentce37a209c6394115eb77c01b877dfd3ae1a6e7e1 (diff)
downloadgitlab-ce-34ba80392dd23614f60a759ec41b4df1f2915f49.tar.gz
Use :request_store hooks on specsuse-request-store-helper-instead-actual-code
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 8b8fbf6e862..110428da794 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -74,6 +74,15 @@ RSpec.configure do |config|
TestEnv.cleanup
end
+ config.before(:example, :request_store) do
+ RequestStore.begin!
+ end
+
+ config.after(:example, :request_store) do
+ RequestStore.end!
+ RequestStore.clear!
+ end
+
if ENV['CI']
# Retry only on feature specs that use JS
config.around :each, :js do |ex|