debian-mirror-gitlab/spec/support/matchers/event_store.rb

13 lines
270 B
Ruby
Raw Normal View History

2022-04-04 11:22:00 +05:30
# 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