diff options
author | Stan Hu <stanhu@gmail.com> | 2019-06-25 11:52:56 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-06-25 11:52:56 -0700 |
commit | 004ff651964e74811bb553590eee495b6ceaab38 (patch) | |
tree | 62c3eeede6c104b0bb1467c3879d89827a99faaf | |
parent | 76889a9956e76e300edc8993048c3cd5c3a24da0 (diff) | |
download | gitlab-ce-004ff651964e74811bb553590eee495b6ceaab38.tar.gz |
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).
-rw-r--r-- | spec/support/inspect_squelch.rb | 7 |
1 files changed, 7 insertions, 0 deletions
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 |