diff options
| author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-10-11 14:48:28 +0200 |
|---|---|---|
| committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-10-11 14:48:28 +0200 |
| commit | eedf43d69bb2d3e5ed73b751565beb5d1badd8c7 (patch) | |
| tree | ea67eb96dea8f7b236a7161bfb524b601efd1a31 /spec/support | |
| parent | 54f490a455dea705908d5e262fb5fe205147fa09 (diff) | |
| download | gitlab-ce-eedf43d69bb2d3e5ed73b751565beb5d1badd8c7.tar.gz | |
Set pipeline config source attribute in a build step
Diffstat (limited to 'spec/support')
| -rw-r--r-- | spec/support/stub_gitlab_calls.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/stub_gitlab_calls.rb b/spec/support/stub_gitlab_calls.rb index 5f22d886910..c1618f5086c 100644 --- a/spec/support/stub_gitlab_calls.rb +++ b/spec/support/stub_gitlab_calls.rb @@ -21,6 +21,12 @@ module StubGitlabCalls allow_any_instance_of(Ci::Pipeline).to receive(:ci_yaml_file) { ci_yaml } end + def stub_repository_ci_yaml_file(sha:, path: '.gitlab-ci.yml') + allow_any_instance_of(Repository) + .to receive(:gitlab_ci_yml_for).with(sha, path) + .and_return(gitlab_ci_yaml) + end + def stub_ci_builds_disabled allow_any_instance_of(Project).to receive(:builds_enabled?).and_return(false) end |
