summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/support/test_env.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb
index 769405b6ffb..0f81347dd6b 100644
--- a/spec/support/test_env.rb
+++ b/spec/support/test_env.rb
@@ -17,15 +17,18 @@ module TestEnv
repos_path = Rails.root.join('tmp', 'test-git-base-path')
Gitlab.config.gitlab_shell.stub(repos_path: repos_path)
+ Gitlab::Shell.any_instance.stub(:add_repository) do |path|
+ create_temp_repo(File.join(repos_path, "#{path}.git"))
+ end
+
Gitlab::Shell.any_instance.stub(
- add_repository: ->(path) { create_temp_repo(File.join(repos_path, "#{path}.git")) },
mv_repository: true,
remove_repository: true,
add_key: true,
remove_key: true
)
- fake_satellite = double(
+ fake_satellite = stub(
exists?: true,
destroy: true,
create: true