diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-09 15:08:59 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-09 15:08:59 +0000 |
commit | 4a14cfd1959c6a03758d0a75afe7b4277cf113ec (patch) | |
tree | caa9aa524ee10076f94a6369227aaf566cbb6e74 /tooling/lib | |
parent | faeb202bd4a4099d4cff5a5717915883ac51422f (diff) | |
download | gitlab-ce-4a14cfd1959c6a03758d0a75afe7b4277cf113ec.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'tooling/lib')
-rw-r--r-- | tooling/lib/tooling/test_file_finder.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tooling/lib/tooling/test_file_finder.rb b/tooling/lib/tooling/test_file_finder.rb index 36ace67caa3..cf5de190c4a 100644 --- a/tooling/lib/tooling/test_file_finder.rb +++ b/tooling/lib/tooling/test_file_finder.rb @@ -72,9 +72,9 @@ module Tooling ImpactedTestFile.new do |impact| impact.associate(%r{app/(.+)\.rb$}) { |match| "spec/#{match[1]}_spec.rb" } impact.associate(%r{(tooling/)?lib/(.+)\.rb$}) { |match| "spec/#{match[1]}lib/#{match[2]}_spec.rb" } - impact.associate(%r{config/initializers/(.+).rb$}) { |match| "spec/initializers/#{match[1]}_spec.rb" } + impact.associate(%r{config/initializers/(.+)\.rb$}) { |match| "spec/initializers/#{match[1]}_spec.rb" } impact.associate('db/structure.sql') { 'spec/db/schema_spec.rb' } - impact.associate(%r{db/(?:post_)?migrate/([0-9]+)_(.+).rb$}) do |match| + impact.associate(%r{db/(?:post_)?migrate/([0-9]+)_(.+)\.rb$}) do |match| [ "spec/migrations/#{match[2]}_spec.rb", "spec/migrations/#{match[1]}_#{match[2]}_spec.rb" @@ -84,8 +84,9 @@ module Tooling end def either_impact - ImpactedTestFile.new(prefix: %r{^(#{EE_PREFIX})?}) do |impact| - impact.associate(%r{spec/(.+)_spec.rb$}) { |match| match[0] } + ImpactedTestFile.new(prefix: %r{^(?<prefix>#{EE_PREFIX})?}) do |impact| + impact.associate(%r{app/views/(?<view>.+)\.haml$}) { |match| "#{match[:prefix]}spec/views/#{match[:view]}.haml_spec.rb" } + impact.associate(%r{spec/(.+)_spec\.rb$}) { |match| match[0] } impact.associate(%r{spec/factories/.+\.rb$}) { 'spec/factories_spec.rb' } end end |