From 004ff651964e74811bb553590eee495b6ceaab38 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 25 Jun 2019 11:52:56 -0700 Subject: [PATCH] Squelch output of ActiveSupport::Cache::NullStore in tests When a spec fails relating to the cache, the job log can easily exceed the maximum length and make it harder to see the actual issue (e.g. https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/239803017). --- spec/support/inspect_squelch.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 spec/support/inspect_squelch.rb diff --git a/spec/support/inspect_squelch.rb b/spec/support/inspect_squelch.rb new file mode 100644 index 00000000000..8ee6732370b --- /dev/null +++ b/spec/support/inspect_squelch.rb @@ -0,0 +1,7 @@ +# This class can generate a lot of output if it fails, +# so squelch the instance variable output. +class ActiveSupport::Cache::NullStore + def inspect + "<#{self.class}>" + end +end