Commit 2a6de5df authored by Albert Salim's avatar Albert Salim

Merge `lib/` and `tooling/lib` association

parent 8963f669
......@@ -31,10 +31,10 @@ RSpec.describe Tooling::TestFileFinder do
end
context 'when given a file in tooling/' do
let(:file) { 'tooling/lib/quality/test_file_finder.rb' }
let(:file) { 'tooling/lib/tooling/test_file_finder.rb' }
it 'returns the matching tooling test' do
expect(subject.test_files).to contain_exactly('spec/tooling/lib/quality/test_file_finder_spec.rb')
expect(subject.test_files).to contain_exactly('spec/tooling/lib/tooling/test_file_finder_spec.rb')
end
end
......
......@@ -60,9 +60,8 @@ module Tooling
def foss_matcher
TestFileMatcher.new do |matcher|
matcher.associate(%r{^app/(.+)\.rb$}) { |match| "spec/#{match[1]}_spec.rb" }
matcher.associate(%r{^lib/(.+)\.rb$}) { |match| "spec/lib/#{match[1]}_spec.rb" }
matcher.associate(%r{^(tooling/)?lib/(.+)\.rb$}) { |match| "spec/#{match[1]}lib/#{match[2]}_spec.rb" }
matcher.associate(%r{^spec/(.+)_spec.rb$}) { |match| match[0] }
matcher.associate(%r{^(tooling/lib/.+)\.rb$}) { |match| "spec/#{match[1]}_spec.rb" }
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