Skip to content

Commit

Permalink
+ Added Minitest::SEED, the random seed used by the run.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//src/minitest/dev/": change = 13423]
  • Loading branch information
zenspider committed Jun 5, 2022
1 parent 9cdb2c6 commit 288eb6e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/minitest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ module Minitest
VERSION = "5.15.0" # :nodoc:
ENCS = "".respond_to? :encoding # :nodoc:

##
# The random seed used for this run.
#
# Set via Minitest.run after processing args.

SEED = nil

@@installed_at_exit ||= false
@@after_run = []
@extensions = []
Expand Down Expand Up @@ -132,6 +139,8 @@ def self.run args = []

options = process_args args

Minitest.const_set :SEED, options[:seed] unless defined?(Minitest::SEED)

reporter = CompositeReporter.new
reporter << SummaryReporter.new(options[:io], options)
reporter << ProgressReporter.new(options[:io], options)
Expand Down

0 comments on commit 288eb6e

Please sign in to comment.