diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-21 11:44:33 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-21 11:44:33 +0200 |
commit | 28da2a8bdc8fd5cbb05a32933c0ab1c56202481f (patch) | |
tree | 40100990429a13cc045855eb5a99aac527385288 /spec/support | |
parent | 42ce2c108022f09e6c8e2fa9a90ea3f74f2b97b4 (diff) | |
download | gitlab-ce-28da2a8bdc8fd5cbb05a32933c0ab1c56202481f.tar.gz |
Monkeypatch satellite call for merge request in tests
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/stubbed_repository.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/support/stubbed_repository.rb b/spec/support/stubbed_repository.rb index 434cab6516e..347989634c0 100644 --- a/spec/support/stubbed_repository.rb +++ b/spec/support/stubbed_repository.rb @@ -1,5 +1,6 @@ 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')) |