зеркало из https://github.com/github/ruby.git
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.
This commit is contained in:
Родитель
14f1790807
Коммит
6b30638bdb
|
@ -763,7 +763,7 @@ module MiniTest
|
|||
# Lazy accessor for options.
|
||||
|
||||
def options
|
||||
@options ||= {}
|
||||
@options ||= {seed: 42}
|
||||
end
|
||||
|
||||
@@installed_at_exit ||= false
|
||||
|
|
|
@ -47,7 +47,6 @@ class MetaMetaMetaTestCase < MiniTest::Unit::TestCase
|
|||
srand 42
|
||||
MiniTest::Unit::TestCase.reset
|
||||
@tu = MiniTest::Unit.new
|
||||
@tu.options[:seed] = 42
|
||||
|
||||
MiniTest::Unit.runner = nil # protect the outer runner from the inner tests
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче