summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorFrancisco Javier López <fjlopez@gitlab.com>2018-07-06 07:51:31 +0000
committerDouwe Maan <douwe@gitlab.com>2018-07-06 07:51:31 +0000
commit837c3b3d7322c56aa7baeec9b8fb617afe5b5e5c (patch)
treeb6da7ba13c76c13e3afee03c11b7524f896f207f /spec/spec_helper.rb
parent83f79ced3fd98031194e5667c4d80f66d7987c67 (diff)
downloadgitlab-ce-837c3b3d7322c56aa7baeec9b8fb617afe5b5e5c.tar.gz
Fix User role displayed on projects dashboard
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index fdce8e84620..46ec1bcef24 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -170,6 +170,17 @@ RSpec.configure do |config|
redis_queues_cleanup!
end
+ config.around(:each, :use_clean_rails_memory_store_fragment_caching) do |example|
+ caching_store = ActionController::Base.cache_store
+ ActionController::Base.cache_store = ActiveSupport::Cache::MemoryStore.new
+ ActionController::Base.perform_caching = true
+
+ example.run
+
+ ActionController::Base.perform_caching = false
+ ActionController::Base.cache_store = caching_store
+ end
+
# The :each scope runs "inside" the example, so this hook ensures the DB is in the
# correct state before any examples' before hooks are called. This prevents a
# problem where `ScheduleIssuesClosedAtTypeChange` (or any migration that depends