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
@ -188,7 +188,8 @@ class MSpecScript
|
||||
if File.file?(expanded) && expanded.end_with?('.rb')
|
||||
return [expanded]
|
||||
elsif File.directory?(expanded)
|
||||
return Dir["#{expanded}/**/*_spec.rb"].sort
|
||||
specs = Dir["#{expanded}/**/*_spec.rb"].sort
|
||||
return specs unless specs.empty?
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user