summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-21 11:44:33 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-21 11:44:33 +0200
commit28da2a8bdc8fd5cbb05a32933c0ab1c56202481f (patch)
tree40100990429a13cc045855eb5a99aac527385288 /spec/support
parent42ce2c108022f09e6c8e2fa9a90ea3f74f2b97b4 (diff)
downloadgitlab-ce-28da2a8bdc8fd5cbb05a32933c0ab1c56202481f.tar.gz
Monkeypatch satellite call for merge request in tests
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/stubbed_repository.rb7
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'))