use kernel.rand/srand
This commit is contained in:
parent
602eb634d7
commit
3c993001de
@ -62,7 +62,7 @@ module Jasmine::Headless
|
|||||||
def initialize(options = {})
|
def initialize(options = {})
|
||||||
@options = options
|
@options = options
|
||||||
|
|
||||||
srand(@options[:seed]) if @options[:seed]
|
Kernel.srand(@options[:seed]) if @options[:seed]
|
||||||
|
|
||||||
@required_files = UniqueAssetList.new
|
@required_files = UniqueAssetList.new
|
||||||
@potential_files_to_filter = []
|
@potential_files_to_filter = []
|
||||||
@ -186,7 +186,7 @@ module Jasmine::Headless
|
|||||||
dirs.product(patterns).each do |search|
|
dirs.product(patterns).each do |search|
|
||||||
files = Dir[File.join(*search)].find_all { |file| file[extension_filter] }
|
files = Dir[File.join(*search)].find_all { |file| file[extension_filter] }
|
||||||
|
|
||||||
files.sort! { |a, b| rand(3) - 1 } if type == 'spec_files'
|
files.sort! { |a, b| Kernel.rand(3) - 1 } if type == 'spec_files'
|
||||||
|
|
||||||
files.each do |path|
|
files.each do |path|
|
||||||
add_path(path, type) if File.file?(path)
|
add_path(path, type) if File.file?(path)
|
||||||
|
Loading…
Reference in New Issue
Block a user