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:
parent
116c632095
commit
7c1553e91d
1 changed files with 3 additions and 0 deletions
|
@ -1297,6 +1297,9 @@ module MiniTest
|
|||
start_time = Time.now
|
||||
|
||||
result = ""
|
||||
|
||||
srand @options[:seed]
|
||||
|
||||
begin
|
||||
@passed = nil
|
||||
self.before_setup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue