diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-09-07 08:16:29 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-09-07 08:16:29 +0300 |
commit | 79021e674bab1d34609228343fbf3403d9bd9bc6 (patch) | |
tree | 9a700d8521ab105532f483bb84450a51a8bcb1f2 /spec/support | |
parent | 137594dd08e739a68af656d697a5b8c6be23854f (diff) | |
download | gitlab-ce-79021e674bab1d34609228343fbf3403d9bd9bc6.tar.gz |
Split gitolite backend. Use gitolite_config methods moved to separate class
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/gitolite_stub.rb | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/spec/support/gitolite_stub.rb b/spec/support/gitolite_stub.rb index 2a907f99bc8..037b09cd555 100644 --- a/spec/support/gitolite_stub.rb +++ b/spec/support/gitolite_stub.rb @@ -17,7 +17,7 @@ module GitoliteStub ) gitolite_admin = double( - 'Gitolite::GitoliteAdmin', + 'Gitolite::GitoliteAdmin', config: gitolite_config, save: true, ) @@ -27,9 +27,21 @@ module GitoliteStub end def stub_gitlab_gitolite - gitlab_gitolite = Gitlab::Gitolite.new - Gitlab::Gitolite.stub(new: gitlab_gitolite) - gitlab_gitolite.stub(configure: ->() { yield(self) }) - gitlab_gitolite.stub(update_keys: true) + gitolite_config = double('Gitlab::GitoliteConfig') + gitolite_config.stub( + apply: ->() { yield(self) }, + write_key: true, + rm_key: true, + update_projects: true, + update_project: true, + update_project!: true, + destroy_project: true, + destroy_project!: true, + admin_all_repo: true, + admin_all_repo!: true, + + ) + + Gitlab::GitoliteConfig.stub(new: gitolite_config) end end |