Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2a6de5df
Commit
2a6de5df
authored
Jun 15, 2020
by
Albert Salim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge `lib/` and `tooling/lib` association
parent
8963f669
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
spec/tooling/lib/tooling/test_file_finder_spec.rb
spec/tooling/lib/tooling/test_file_finder_spec.rb
+2
-2
tooling/lib/tooling/test_file_finder.rb
tooling/lib/tooling/test_file_finder.rb
+1
-2
No files found.
spec/tooling/lib/tooling/test_file_finder_spec.rb
View file @
2a6de5df
...
...
@@ -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
...
...
tooling/lib/tooling/test_file_finder.rb
View file @
2a6de5df
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment