gitlab-org--gitlab-foss/spec/support/matchers/gitaly_matchers.rb

10 lines
287 B
Ruby
Raw Normal View History

RSpec::Matchers.define :gitaly_request_with_repo_path do |path|
match { |actual| actual.repository.path == path }
end
RSpec::Matchers.define :gitaly_request_with_params do |params|
match do |actual|
params.reduce(true) { |r, (key, val)| r && actual.send(key) == val }
end
end