1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

srand($seed) at the beginning of each test

To avoid `srand(0)` effect in the other tests, call `srand($seed)`
at the beginning of each test (setup).
[Feature #16655]
This commit is contained in:
Koichi Sasada 2020-02-27 02:29:57 +09:00
parent 116c632095
commit 7c1553e91d

View file

@ -1297,6 +1297,9 @@ module MiniTest
start_time = Time.now
result = ""
srand @options[:seed]
begin
@passed = nil
self.before_setup