Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-21 13:44:33 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-21 13:44:33 +0400
commit28da2a8bdc8fd5cbb05a32933c0ab1c56202481f (patch)
tree40100990429a13cc045855eb5a99aac527385288 /spec
parent42ce2c108022f09e6c8e2fa9a90ea3f74f2b97b4 (diff)
Monkeypatch satellite call for merge request in tests
Diffstat (limited to 'spec')
-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'))