From 416c67541f1bafb129fdaed33dc2d94e2c21a718 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Wed, 5 Jul 2017 07:42:17 -0700 Subject: [PATCH] Disable Flipper memoizer in tests to avoid transient failures Closes #34278 --- config/initializers/flipper.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/initializers/flipper.rb b/config/initializers/flipper.rb index 0fee832788d..8ec9613a4b7 100644 --- a/config/initializers/flipper.rb +++ b/config/initializers/flipper.rb @@ -1,4 +1,6 @@ require 'flipper/middleware/memoizer' -Rails.application.config.middleware.use Flipper::Middleware::Memoizer, - lambda { Feature.flipper } +unless Rails.env.test? + Rails.application.config.middleware.use Flipper::Middleware::Memoizer, + lambda { Feature.flipper } +end