From 1c81ea7286457df6fa16149db56900a43210faaa Mon Sep 17 00:00:00 2001 From: William Josephson Date: Mon, 2 Apr 2012 22:12:45 -0400 Subject: [PATCH] Most filesystems don't guarantee directory listing order, so sort glob results. --- lib/jasmine/headless/files_list.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/jasmine/headless/files_list.rb b/lib/jasmine/headless/files_list.rb index 6a6589c..aad2d62 100644 --- a/lib/jasmine/headless/files_list.rb +++ b/lib/jasmine/headless/files_list.rb @@ -255,7 +255,8 @@ module Jasmine::Headless 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)