diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-03-17 16:36:46 -0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-05-17 18:12:10 -0400 |
commit | 925945f01b1dcaf7b288afd7be53175a04eaecad (patch) | |
tree | a6c164900b11cf7829f8c787d0a0c10d7002c78b /spec/support/matchers/gitaly_matchers.rb | |
parent | 71569a9c410d297469c86227807c9f60cc069ef6 (diff) | |
download | gitlab-ce-gitaly-local-branches.tar.gz |
Incorporate Gitaly's local_branches operation into repo codegitaly-local-branches
Diffstat (limited to 'spec/support/matchers/gitaly_matchers.rb')
-rw-r--r-- | spec/support/matchers/gitaly_matchers.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/matchers/gitaly_matchers.rb b/spec/support/matchers/gitaly_matchers.rb index 65dbc01f6e4..ed14bcec9f2 100644 --- a/spec/support/matchers/gitaly_matchers.rb +++ b/spec/support/matchers/gitaly_matchers.rb @@ -1,3 +1,9 @@ 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 |