Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2017-03-17 22:36:46 +0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2017-05-18 01:12:10 +0300
commit925945f01b1dcaf7b288afd7be53175a04eaecad (patch)
treea6c164900b11cf7829f8c787d0a0c10d7002c78b /spec/support/matchers/gitaly_matchers.rb
parent71569a9c410d297469c86227807c9f60cc069ef6 (diff)
Incorporate Gitaly's local_branches operation into repo code
Diffstat (limited to 'spec/support/matchers/gitaly_matchers.rb')
-rw-r--r--spec/support/matchers/gitaly_matchers.rb6
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