random_sample should use Spectator's global random

This commit is contained in:
Michael Miller 2019-04-02 22:22:40 -06:00
parent 57c54d943c
commit 31a2bbcebb

View file

@ -651,7 +651,7 @@ module Spectator::DSL
# 2. The collection might contain randomly generated values.
# Iterating multiple times would generate inconsistent values at runtime.
def %to_a
%sample.to_a.sample({{count}})
%sample.to_a.sample({{count}}, ::Spectator.random)
end
end