summaryrefslogtreecommitdiff
path: root/spec/support/helpers/git_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/git_helpers.rb')
-rw-r--r--spec/support/helpers/git_helpers.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/helpers/git_helpers.rb b/spec/support/helpers/git_helpers.rb
index fc92bc38561..99a7c39852e 100644
--- a/spec/support/helpers/git_helpers.rb
+++ b/spec/support/helpers/git_helpers.rb
@@ -1,6 +1,12 @@
# frozen_string_literal: true
module GitHelpers
+ def rugged_repo(repository)
+ path = File.join(TestEnv.repos_path, repository.disk_path + '.git')
+
+ Rugged::Repository.new(path)
+ end
+
def project_hook_exists?(project)
Gitlab::GitalyClient::StorageSettings.allow_disk_access do
project_path = project.repository.raw_repository.path