diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-10 15:18:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-10 15:18:48 +0300 |
commit | 190128fc72e015c383e7a96c128276d1833f3beb (patch) | |
tree | c9defcce34e8e0661c3a2cebe78847e9d9f14a39 /spec/support/matchers | |
parent | de74d20b2596c8d27987744d24a7fc09fbe8ff37 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/matchers')
-rw-r--r-- | spec/support/matchers/event_store.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/support/matchers/event_store.rb b/spec/support/matchers/event_store.rb new file mode 100644 index 00000000000..96a71ae3c22 --- /dev/null +++ b/spec/support/matchers/event_store.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +RSpec::Matchers.define :event_type do |event_class| + match do |actual| + actual.instance_of?(event_class) && + actual.data == @expected_data + end + + chain :containing do |expected_data| + @expected_data = expected_data + end +end |