Commit f75a0f7b authored by Rajendra Kadam's avatar Rajendra Kadam Committed by Peter Leitzen

Fix leaky constant in factory spec

parent 1f2f456c
......@@ -353,7 +353,6 @@ RSpec/LeakyConstantDeclaration:
- 'spec/lib/gitlab/ci/config/entry/retry_spec.rb'
- 'spec/lib/gitlab/cluster/mixins/puma_cluster_spec.rb'
- 'spec/lib/gitlab/cluster/mixins/unicorn_http_server_spec.rb'
- 'spec/lib/gitlab/config/entry/factory_spec.rb'
- 'spec/lib/gitlab/config/entry/simplifiable_spec.rb'
- 'spec/lib/gitlab/database/migration_helpers_spec.rb'
- 'spec/lib/gitlab/database/obsolete_ignored_columns_spec.rb'
......
---
title: Fix leaky constant issue in factory spec
merge_request: 32174
author: Rajendra Kadam
type: fixed
......@@ -4,11 +4,14 @@ require 'spec_helper'
describe Gitlab::Config::Entry::Factory do
describe '#create!' do
class Script < Gitlab::Config::Entry::Node
include Gitlab::Config::Entry::Validatable
before do
stub_const('Script', Class.new(Gitlab::Config::Entry::Node))
Script.class_eval do
include Gitlab::Config::Entry::Validatable
validations do
validates :config, array_of_strings: true
validations do
validates :config, array_of_strings: true
end
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