gitlab-org--gitlab-foss/spec/support/matchers/gitaly_matchers.rb
Alejandro Rodríguez 58821ebbb4 Stop using deprecated path field on Gitaly messages
This revealed an error in our configuration generation in
gitlab:gitaly:install rake task. The fix is included
2017-06-14 19:33:43 -04:00

14 lines
410 B
Ruby

RSpec::Matchers.define :gitaly_request_with_path do |storage_name, relative_path|
match do |actual|
repository = actual.repository
repository.storage_name == storage_name &&
repository.relative_path == relative_path
end
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