File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 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/).
99### Added
1010
1111### Changed
12+ - ` CiConfig::allowable_unittest_files ` now uses ` Pathname ` to full effect
1213
1314### Deprecated
1415
Original file line number Diff line number Diff line change @@ -287,17 +287,17 @@ def aux_libraries_for_unittest
287287 end
288288
289289 # 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
292292 def allowable_unittest_files ( paths )
293293 return paths if @unittest_info [ :testfiles ] . nil?
294294
295295 ret = paths
296296 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 ) } }
298298 end
299299 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 ) } }
301301 end
302302 ret
303303 end
You can’t perform that action at this time.
0 commit comments