diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 15:40:28 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 15:40:28 +0000 |
commit | b595cb0c1dec83de5bdee18284abe86614bed33b (patch) | |
tree | 8c3d4540f193c5ff98019352f554e921b3a41a72 /spec/lib/gitlab/ci/config/external/mapper_spec.rb | |
parent | 2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff) | |
download | gitlab-ce-b595cb0c1dec83de5bdee18284abe86614bed33b.tar.gz |
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'spec/lib/gitlab/ci/config/external/mapper_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/config/external/mapper_spec.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/spec/lib/gitlab/ci/config/external/mapper_spec.rb b/spec/lib/gitlab/ci/config/external/mapper_spec.rb index 7e1b31fea6a..e74fdc2071b 100644 --- a/spec/lib/gitlab/ci/config/external/mapper_spec.rb +++ b/spec/lib/gitlab/ci/config/external/mapper_spec.rb @@ -232,11 +232,9 @@ RSpec.describe Gitlab::Ci::Config::External::Mapper do image: 'image:1.0' } end - before do - stub_const("#{described_class}::MAX_INCLUDES", 2) - end - it 'does not raise an exception' do + allow(context).to receive(:max_includes).and_return(2) + expect { subject }.not_to raise_error end end @@ -250,11 +248,9 @@ RSpec.describe Gitlab::Ci::Config::External::Mapper do image: 'image:1.0' } end - before do - stub_const("#{described_class}::MAX_INCLUDES", 1) - end - it 'raises an exception' do + allow(context).to receive(:max_includes).and_return(1) + expect { subject }.to raise_error(described_class::TooManyIncludesError) end @@ -264,6 +260,8 @@ RSpec.describe Gitlab::Ci::Config::External::Mapper do end it 'raises an exception' do + allow(context).to receive(:max_includes).and_return(1) + expect { subject }.to raise_error(described_class::TooManyIncludesError) end end |