summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index ace5ca00cc1..7728b1e9d84 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -40,5 +40,10 @@ RSpec.configure do |config|
# !!! Observers disabled by default in tests
ActiveRecord::Base.observers.disable(:all)
# ActiveRecord::Base.observers.enable(:all)
+
+ # Use tmp dir for FS manipulations
+ Gitlab.config.stub(git_base_path: Rails.root.join('tmp', 'test-git-base-path'))
+ FileUtils.rm_rf Gitlab.config.git_base_path
+ FileUtils.mkdir_p Gitlab.config.git_base_path
end
end