From 65fe4bb1ceed6bae05724f3494fb57e8b09fa616 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 8 Dec 2015 11:59:46 +0100 Subject: Improve gitlab ci commits specs (refactoring) This minimizes usage of instance variables in this spec, and changes double quotation marks to single when string interpolation is not being used. --- spec/support/stub_gitlab_calls.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spec/support') diff --git a/spec/support/stub_gitlab_calls.rb b/spec/support/stub_gitlab_calls.rb index 5b3eb1bfc5f..90936183824 100644 --- a/spec/support/stub_gitlab_calls.rb +++ b/spec/support/stub_gitlab_calls.rb @@ -21,6 +21,10 @@ module StubGitlabCalls allow_any_instance_of(Ci::Commit).to receive(:ci_yaml_file) { ci_yaml } end + def stub_ci_service_disabled + allow_any_instance_of(GitlabCiService).to receive(:active).and_return(false) + end + private def gitlab_url -- cgit v1.2.1