summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-11 21:09:19 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-11 21:09:19 +0000
commitfca89bb73ff5b1d14c98c72481f9268fee107ea0 (patch)
treee1c8a2c4fe5df7f054fd09e49f53bcfb51e51c84 /spec/spec_helper.rb
parent76e9fc7b29c1ce716c26932e9fbec0f3c99f53f4 (diff)
downloadgitlab-ce-fca89bb73ff5b1d14c98c72481f9268fee107ea0.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index d379fd494fa..3f6503a60a9 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -76,11 +76,16 @@ RSpec.configure do |config|
metadata[:level] = quality_level.level_for(location)
metadata[:api] = true if location =~ %r{/spec/requests/api/}
- # do not overwrite type if it's already set
- next if metadata.key?(:type)
+ # Do not overwrite migration if it's already set
+ unless metadata.key?(:migration)
+ metadata[:migration] = true if metadata[:level] == :migration
+ end
- match = location.match(%r{/spec/([^/]+)/})
- metadata[:type] = match[1].singularize.to_sym if match
+ # Do not overwrite type if it's already set
+ unless metadata.key?(:type)
+ match = location.match(%r{/spec/([^/]+)/})
+ metadata[:type] = match[1].singularize.to_sym if match
+ end
end
config.include LicenseHelpers