BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
28da2a8b
Commit
28da2a8b
authored
Feb 21, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Monkeypatch satellite call for merge request in tests
parent
42ce2c10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
merge_requests_controller.rb
app/controllers/merge_requests_controller.rb
+2
-0
stubbed_repository.rb
spec/support/stubbed_repository.rb
+7
-0
No files found.
app/controllers/merge_requests_controller.rb
View file @
28da2a8b
require
'gitlab/satellite/satellite'
class
MergeRequestsController
<
ProjectResourceController
before_filter
:module_enabled
before_filter
:merge_request
,
only:
[
:edit
,
:update
,
:show
,
:commits
,
:diffs
,
:automerge
,
:automerge_check
,
:ci_status
]
...
...
spec/support/stubbed_repository.rb
View file @
28da2a8b
require
"repository"
require
"project"
require
"merge_request"
require
"shell"
# Stubs out all Git repository access done by models so that specs can run
...
...
@@ -32,6 +33,12 @@ class Project
end
end
class
MergeRequest
def
can_be_merged
true
end
end
class
GitLabTestRepo
<
Repository
def
repo
@repo
||=
Grit
::
Repo
.
new
(
Rails
.
root
.
join
(
'tmp'
,
'repositories'
,
'gitlabhq'
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment