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