Commit 28da2a8bdc8fd5cbb05a32933c0ab1c56202481f
1 parent
42ce2c10
Exists in
master
and in
4 other branches
Monkeypatch satellite call for merge request in tests
Showing
2 changed files
with
9 additions
and
0 deletions
Show diff stats
app/controllers/merge_requests_controller.rb
spec/support/stubbed_repository.rb
| 1 | 1 | require "repository" |
| 2 | 2 | require "project" |
| 3 | +require "merge_request" | |
| 3 | 4 | require "shell" |
| 4 | 5 | |
| 5 | 6 | # Stubs out all Git repository access done by models so that specs can run |
| ... | ... | @@ -32,6 +33,12 @@ class Project |
| 32 | 33 | end |
| 33 | 34 | end |
| 34 | 35 | |
| 36 | +class MergeRequest | |
| 37 | + def can_be_merged | |
| 38 | + true | |
| 39 | + end | |
| 40 | +end | |
| 41 | + | |
| 35 | 42 | class GitLabTestRepo < Repository |
| 36 | 43 | def repo |
| 37 | 44 | @repo ||= Grit::Repo.new(Rails.root.join('tmp', 'repositories', 'gitlabhq')) | ... | ... |