diff --git a/config/environments/test.rb b/config/environments/test.rb
index 479e7a7b17cc51b92c20a7e695bfa27c370372b3..46cdafe742773085f24a7115d9ca1ec51cb10a9d 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -1,4 +1,5 @@
 require 'active_support/core_ext/integer/time'
+require 'namespaced_env_cache'
 
 # The test environment is used exclusively to run your application's
 # test suite. You never need to work with it otherwise. Remember that
@@ -26,6 +27,14 @@ Rails.application.configure do
   config.consider_all_requests_local       = true
   config.action_controller.perform_caching = false
 
+  processed = ERB.new(File.read(Rails.root.join('config', 'database.yml'))).result(binding)
+  redis_config = YAML.safe_load(processed, [], [], true)["redis_#{Rails.env}"]
+  config.cache_store = QPixel::NamespacedEnvCache.new(
+    ActiveSupport::Cache::RedisCacheStore.new(
+      url: "redis://#{redis_config['host']}:#{redis_config['port']}"
+    )
+  )
+
   # Raise exceptions instead of rendering exception templates.
   config.action_dispatch.show_exceptions = false