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/matchers/track_self_describing_event_matcher.rb')
-rw-r--r--spec/support/matchers/track_self_describing_event_matcher.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/support/matchers/track_self_describing_event_matcher.rb b/spec/support/matchers/track_self_describing_event_matcher.rb
new file mode 100644
index 00000000000..c3723d2418f
--- /dev/null
+++ b/spec/support/matchers/track_self_describing_event_matcher.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+RSpec::Matchers.define :track_self_describing_event do |schema, data|
+ match do
+ expect(Gitlab::Tracking).to have_received(:self_describing_event)
+ .with(schema, data: data)
+ end
+
+ match_when_negated do
+ expect(Gitlab::Tracking).not_to have_received(:self_describing_event)
+ end
+end