mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
script.rb: skip empty directories
* spec/mspec/lib/mspec/utils/script.rb (entries): skip empty directories so that at least one file would run. Merged https://github.com/ruby/spec/issues/459 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
29b114a1ea
commit
45270d20ed
1 changed files with 2 additions and 1 deletions
|
@ -188,7 +188,8 @@ class MSpecScript
|
||||||
if File.file?(expanded) && expanded.end_with?('.rb')
|
if File.file?(expanded) && expanded.end_with?('.rb')
|
||||||
return [expanded]
|
return [expanded]
|
||||||
elsif File.directory?(expanded)
|
elsif File.directory?(expanded)
|
||||||
return Dir["#{expanded}/**/*_spec.rb"].sort
|
specs = Dir["#{expanded}/**/*_spec.rb"].sort
|
||||||
|
return specs unless specs.empty?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue