summaryrefslogtreecommitdiff
path: root/spec/support/stub_gitlab_calls.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-10-05 13:12:00 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2015-10-05 13:12:00 +0200
commitd2d2df0738f3cd8311963c34d90ebc8ce4081aa6 (patch)
treed3f342088131b73b62eb0e5cf494693fd80e5557 /spec/support/stub_gitlab_calls.rb
parent361dc3641dd28c4ecefbda94f7a8dad299c349aa (diff)
downloadgitlab-ce-d2d2df0738f3cd8311963c34d90ebc8ce4081aa6.tar.gz
Fix next round of tests
Diffstat (limited to 'spec/support/stub_gitlab_calls.rb')
-rw-r--r--spec/support/stub_gitlab_calls.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/support/stub_gitlab_calls.rb b/spec/support/stub_gitlab_calls.rb
index 5e6744afda1..5b3eb1bfc5f 100644
--- a/spec/support/stub_gitlab_calls.rb
+++ b/spec/support/stub_gitlab_calls.rb
@@ -13,6 +13,14 @@ module StubGitlabCalls
allow_any_instance_of(Network).to receive(:projects) { project_hash_array }
end
+ def stub_ci_commit_to_return_yaml_file
+ stub_ci_commit_yaml_file(gitlab_ci_yaml)
+ end
+
+ def stub_ci_commit_yaml_file(ci_yaml)
+ allow_any_instance_of(Ci::Commit).to receive(:ci_yaml_file) { ci_yaml }
+ end
+
private
def gitlab_url