diff options
Diffstat (limited to 'spec/lib/gitlab/reference_extractor_spec.rb')
-rw-r--r-- | spec/lib/gitlab/reference_extractor_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/lib/gitlab/reference_extractor_spec.rb b/spec/lib/gitlab/reference_extractor_spec.rb index 7513dbeeb6f..f6ace0d8bf5 100644 --- a/spec/lib/gitlab/reference_extractor_spec.rb +++ b/spec/lib/gitlab/reference_extractor_spec.rb @@ -265,7 +265,8 @@ describe Gitlab::ReferenceExtractor do describe 'referables prefixes' do def prefixes described_class::REFERABLES.each_with_object({}) do |referable, result| - klass = referable.to_s.camelize.constantize + class_name = referable.to_s.camelize + klass = class_name.constantize if Object.const_defined?(class_name) next unless klass.respond_to?(:reference_prefix) |