Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion bin/bacon
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '../lib/')
module Bacon; end

automatic = false
random = Random.new
output = 'SpecDoxOutput'

options = OptionParser.new("", 24, ' ') { |opts|
Expand Down Expand Up @@ -65,6 +66,10 @@ options = OptionParser.new("", 24, ' ') { |opts|
$LOAD_PATH.unshift "lib" if File.directory? "lib"
automatic = true
}

opts.on("-u", "--shuffle SEED", Integer, "use SEED for randomizing test file order") { |seed|
random = Random.new seed
}

opts.on('-n', '--name NAME', String,
"runs tests matching regexp NAME") { |n|
Expand Down Expand Up @@ -112,7 +117,7 @@ require 'bacon'
Bacon.extend Bacon.const_get(output) rescue abort "No such formatter: #{output}"
Bacon.summary_on_exit

files.each { |file|
files.shuffle(random: random).each { |file|
load file
}