Browse files

Most filesystems don't guarantee directory listing order, so sort glo…

…b results.
  • Loading branch information...
1 parent 8c6a792 commit 1c81ea7286457df6fa16149db56900a43210faaa William Josephson committed Apr 2, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/jasmine/headless/files_list.rb
View
3 lib/jasmine/headless/files_list.rb
@@ -255,7 +255,8 @@ def config?
end
def expanded_dir(path)
- Dir[path].find_all { |file|
+ file_list = Dir.glob(path).sort
+ file_list.find_all { |file|
file[extension_filter] && !alert_if_bad_format?(file)
}.collect {
|file| File.expand_path(file)

0 comments on commit 1c81ea7

Please sign in to comment.