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:
Diffstat (limited to 'spec/support/helpers/graphql/fake_tracer.rb')
-rw-r--r--spec/support/helpers/graphql/fake_tracer.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/support/helpers/graphql/fake_tracer.rb b/spec/support/helpers/graphql/fake_tracer.rb
new file mode 100644
index 00000000000..58688c9abd0
--- /dev/null
+++ b/spec/support/helpers/graphql/fake_tracer.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module Graphql
+ class FakeTracer
+ def initialize(trace_callback)
+ @trace_callback = trace_callback
+ end
+
+ def trace(...)
+ @trace_callback.call(...)
+
+ yield
+ end
+ end
+end