From 4a14cfd1959c6a03758d0a75afe7b4277cf113ec Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 9 Jul 2020 15:08:59 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- tooling/lib/tooling/test_file_finder.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tooling') 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{^(?#{EE_PREFIX})?}) do |impact| + impact.associate(%r{app/views/(?.+)\.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 -- cgit v1.2.3