Commit 4be4b61d authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'caalberts-strip-spec-directory' into 'master'

Strip leading `./` in test mapping spec path

See merge request gitlab-org/gitlab!48743
parents 894fcfd1 158d5123
......@@ -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