Commit 158d5123 authored by Albert Salim's avatar Albert Salim Committed by Lin Jen-Shin

Strip leading `./` in test mapping spec path

parent 69985326
...@@ -50,13 +50,13 @@ RSpec.describe Tooling::TestMapGenerator do ...@@ -50,13 +50,13 @@ RSpec.describe Tooling::TestMapGenerator do
let(:expected_mapping) do let(:expected_mapping) do
{ {
'lib/gitlab/current_settings.rb' => [ 'lib/gitlab/current_settings.rb' => [
'./spec/factories_spec.rb' 'spec/factories_spec.rb'
], ],
'lib/feature.rb' => [ 'lib/feature.rb' => [
'./spec/factories_spec.rb' 'spec/factories_spec.rb'
], ],
'lib/gitlab/marginalia.rb' => [ 'lib/gitlab/marginalia.rb' => [
'./spec/factories_spec.rb' 'spec/factories_spec.rb'
] ]
} }
end end
...@@ -80,16 +80,16 @@ RSpec.describe Tooling::TestMapGenerator do ...@@ -80,16 +80,16 @@ RSpec.describe Tooling::TestMapGenerator do
let(:expected_mapping) do let(:expected_mapping) do
{ {
'lib/gitlab/current_settings.rb' => [ 'lib/gitlab/current_settings.rb' => [
'./spec/factories_spec.rb', 'spec/factories_spec.rb',
'./spec/models/project_spec.rb' 'spec/models/project_spec.rb'
], ],
'lib/feature.rb' => [ 'lib/feature.rb' => [
'./spec/factories_spec.rb', 'spec/factories_spec.rb',
'./spec/models/project_spec.rb' 'spec/models/project_spec.rb'
], ],
'lib/gitlab/marginalia.rb' => [ 'lib/gitlab/marginalia.rb' => [
'./spec/factories_spec.rb', 'spec/factories_spec.rb',
'./spec/models/project_spec.rb' 'spec/models/project_spec.rb'
] ]
} }
end end
......
...@@ -17,7 +17,7 @@ module Tooling ...@@ -17,7 +17,7 @@ module Tooling
example_groups.each do |example_id, files| example_groups.each do |example_id, files|
files.each do |file| files.each do |file|
spec_file = strip_example_uid(example_id) spec_file = strip_example_uid(example_id)
@mapping[file] << spec_file @mapping[file] << spec_file.delete_prefix('./')
end end
end 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