Fixed protected branches and file edit
This commit is contained in:
parent
afbdbb0c95
commit
ef5b36eaaf
9 changed files with 21 additions and 20 deletions
|
@ -1,6 +1,17 @@
|
|||
require "repository"
|
||||
require "project"
|
||||
|
||||
# Stubs out all Git repository access done by models so that specs can run
|
||||
# against fake repositories without Grit complaining that they don't exist.
|
||||
class Project
|
||||
def repository
|
||||
if path == "empty" || !path
|
||||
nil
|
||||
else
|
||||
GitLabTestRepo.new(path_with_namespace)
|
||||
end
|
||||
end
|
||||
|
||||
def satellite
|
||||
FakeSatellite.new
|
||||
end
|
||||
|
@ -16,7 +27,7 @@ class Project
|
|||
end
|
||||
end
|
||||
|
||||
class Repository
|
||||
class GitLabTestRepo < Repository
|
||||
def repo
|
||||
@repo ||= Grit::Repo.new(Rails.root.join('tmp', 'repositories', 'gitlabhq'))
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue