Don't use random seed unless randomized

This commit is contained in:
Michael Miller 2021-05-18 18:50:43 -06:00
parent b970abd334
commit c0befe63e9
No known key found for this signature in database
GPG key ID: FB9F12F7C646A4AD

View file

@ -16,7 +16,8 @@ module Spectator
# True will be returned if the spec ran successfully,
# or false if there was at least one failure.
def run : Bool
runner = Runner.new(examples, @config.formatter, @config.run_flags, @config.random_seed)
random_seed = (@config.random_seed if @config.run_flags.randomize?)
runner = Runner.new(examples, @config.formatter, @config.run_flags, random_seed)
runner.run
end