File tree 2 files changed +5
-4
lines changed 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
9
9
### Added
10
10
11
11
### Changed
12
+ - ` CiConfig::allowable_unittest_files ` now uses ` Pathname ` to full effect
12
13
13
14
### Deprecated
14
15
Original file line number Diff line number Diff line change @@ -287,17 +287,17 @@ def aux_libraries_for_unittest
287
287
end
288
288
289
289
# Config allows select / reject (aka whitelist / blacklist) criteria. Enforce on a dir
290
- # @param paths [Array<String >] the initial set of test files
291
- # @return [Array<String >] files that match the select/reject criteria
290
+ # @param paths [Array<Pathname >] the initial set of test files
291
+ # @return [Array<Pathname >] files that match the select/reject criteria
292
292
def allowable_unittest_files ( paths )
293
293
return paths if @unittest_info [ :testfiles ] . nil?
294
294
295
295
ret = paths
296
296
unless @unittest_info [ :testfiles ] [ :select ] . nil? || @unittest_info [ :testfiles ] [ :select ] . empty?
297
- ret = ret . select { |p | unittest_info [ :testfiles ] [ :select ] . any? { |glob | File . fnmatch ( glob , File . basename ( p ) ) } }
297
+ ret . select! { |p | unittest_info [ :testfiles ] [ :select ] . any? { |glob | p . basename . fnmatch ( glob ) } }
298
298
end
299
299
unless @unittest_info [ :testfiles ] [ :reject ] . nil?
300
- ret = ret . reject { |p | unittest_info [ :testfiles ] [ :reject ] . any? { |glob | File . fnmatch ( glob , File . basename ( p ) ) } }
300
+ ret . reject! { |p | unittest_info [ :testfiles ] [ :reject ] . any? { |glob | p . basename . fnmatch ( glob ) } }
301
301
end
302
302
ret
303
303
end
You can’t perform that action at this time.
0 commit comments