From f1d8751290181d65d0a4fbc416be6d008e778fd2 Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Fri, 28 Oct 2016 13:28:19 -0400 Subject: [PATCH] Merge pull request #12277 from djberg96/asset_caching Use memory store for assets in test environment (cherry picked from commit ff9564df94f0703b3520f2aa10ce0791dd4aebe6) --- config/environments/test.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/environments/test.rb b/config/environments/test.rb index a963c380d37..6b6b10a2eb4 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -18,6 +18,11 @@ config.public_file_server.enabled = true config.static_cache_control = "public, max-age=3600" + # Avoid potential warnings and race conditions + config.assets.configure do |env| + env.cache = ActiveSupport::Cache.lookup_store(:memory_store) + end + # Log error messages when you accidentally call methods on nil config.whiny_nils = true