Fix api specs. Use id instead path

This commit is contained in:
Dmitriy Zaporozhets 2013-01-02 19:46:06 +02:00
parent d431e43392
commit ccf0686b01
8 changed files with 26 additions and 40 deletions

View file

@ -37,13 +37,10 @@ RSpec.configure do |config|
config.before do
stub_gitolite!
# !!! Observers disabled by default in tests
#ActiveRecord::Base.observers.disable(:all)
# ActiveRecord::Base.observers.enable(:all)
# Use tmp dir for FS manipulations
Gitlab.config.gitolite.stub(repos_path: Rails.root.join('tmp', 'test-git-base-path'))
FileUtils.rm_rf Gitlab.config.gitolite.repos_path
FileUtils.mkdir_p Gitlab.config.gitolite.repos_path
temp_repos_path = Rails.root.join('tmp', 'test-git-base-path')
Gitlab.config.gitolite.stub(repos_path: temp_repos_path)
FileUtils.rm_rf temp_repos_path
FileUtils.mkdir_p temp_repos_path
end
end