diff options
author | Koichi Sasada <ko1@atdot.net> | 2020-02-27 04:06:28 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2020-02-27 04:06:28 +0900 |
commit | 6b30638bdb729c73a05190587123e43e2ffd69f3 (patch) | |
tree | c93667fb2c2204cd593c2b390530dd91d369a2f4 /tool/lib/minitest | |
parent | 14f179080713012251e1faecccefebf2f33ecd86 (diff) | |
download | ruby-6b30638bdb729c73a05190587123e43e2ffd69f3.tar.gz |
MiniTest::Unit.options has default :seed
MiniTest::Unit (superclass of Test::Unit::Runner) does not has
default seed parameter, but assigned after initializing.
However some tests use MiniTest::Unit without setup of seed option
and it cases unexpected test failures. To solve this issue, add
default seed parameter 42.
Diffstat (limited to 'tool/lib/minitest')
-rw-r--r-- | tool/lib/minitest/unit.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/lib/minitest/unit.rb b/tool/lib/minitest/unit.rb index 0b0d892436..f4e5e4ec8b 100644 --- a/tool/lib/minitest/unit.rb +++ b/tool/lib/minitest/unit.rb @@ -763,7 +763,7 @@ module MiniTest # Lazy accessor for options. def options - @options ||= {} + @options ||= {seed: 42} end @@installed_at_exit ||= false |