lunarmodules / busted

Elegant Lua unit testing.
https://lunarmodules.github.io/busted/
MIT License
1.43k stars 186 forks source link

Fix parameters sent to suite start #513

Closed o-lim closed 8 years ago

o-lim commented 8 years ago

This fixes the random seed value that is displayed by some output handlers. When a test suite is repeated multiple times with shuffle enabled and no random seed specified, then a new random seed is generated and used for each complete run of the test suite. However, the random seed being sent to suite start at the beginning of each suite is incorrect when multiple runs are requested. In such cases, the seed passed to suite start is actually the seed for the previous run and not the current run that is being started. This change passes to suite start the random seed being used for the current run.