gitlab-org--gitlab-foss/spec/support/matchers/gitaly_matchers.rb
2017-05-17 18:12:10 -04:00

9 lines
287 B
Ruby

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