diff options
Diffstat (limited to 'spec/lib/gitlab/ci/config/external/processor_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/config/external/processor_spec.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/lib/gitlab/ci/config/external/processor_spec.rb b/spec/lib/gitlab/ci/config/external/processor_spec.rb index 15a0ff40aa4..841a46e197d 100644 --- a/spec/lib/gitlab/ci/config/external/processor_spec.rb +++ b/spec/lib/gitlab/ci/config/external/processor_spec.rb @@ -323,11 +323,9 @@ RSpec.describe Gitlab::Ci::Config::External::Processor do end context 'when too many includes is included' do - before do - stub_const('Gitlab::Ci::Config::External::Mapper::MAX_INCLUDES', 1) - end - it 'raises an error' do + allow(context).to receive(:max_includes).and_return(1) + expect { subject }.to raise_error(Gitlab::Ci::Config::External::Processor::IncludeError, /Maximum of 1 nested/) end end |