Commit 86ccf5c8 authored by Rémy Coutable's avatar Rémy Coutable

Fix wrong calls to `allow_any_instance_of`

Precisely:

  Using `any_instance` to stub a method (secret_variables_for) that has
been defined on a prepended module (EE::Project) is not supported.
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent e3fa5839
...@@ -1694,13 +1694,13 @@ describe Ci::Build do ...@@ -1694,13 +1694,13 @@ describe Ci::Build do
allow_any_instance_of(Project) allow_any_instance_of(Project)
.to receive(:predefined_variables) { [project_pre_var] } .to receive(:predefined_variables) { [project_pre_var] }
allow_any_instance_of(Project) allow_any_instance_of(EE::Project)
.to receive(:secret_variables_for) .to receive(:secret_variables_for)
.with(ref: 'master', environment: nil) do .with(ref: 'master', environment: nil) do
[create(:ci_variable, key: 'secret', value: 'value')] [create(:ci_variable, key: 'secret', value: 'value')]
end end
allow_any_instance_of(Ci::Pipeline) allow_any_instance_of(EE::Ci::Pipeline)
.to receive(:predefined_variables) { [pipeline_pre_var] } .to receive(:predefined_variables) { [pipeline_pre_var] }
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment