Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-06-25 21:52:56 +0300
committerStan Hu <stanhu@gmail.com>2019-06-25 21:52:56 +0300
commit004ff651964e74811bb553590eee495b6ceaab38 (patch)
tree62c3eeede6c104b0bb1467c3879d89827a99faaf /spec/support/inspect_squelch.rb
parent76889a9956e76e300edc8993048c3cd5c3a24da0 (diff)
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).
Diffstat (limited to 'spec/support/inspect_squelch.rb')
-rw-r--r--spec/support/inspect_squelch.rb7
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