gitlab-org--gitlab-foss/spec/support/prometheus/custom_matchers.rb

8 lines
197 B
Ruby
Raw Normal View History

RSpec::Matchers.define :have_incremented do |counter|
match do |adapter|
matcher = RSpec::Mocks::Matchers::HaveReceived.new(:increment)
matcher.matches?(adapter.send(counter))
end
end