You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then rspec --seed 1234 generates non-deterministic faker data.
Expected behavior
I would expect Faker to be based on the Kernel.srand seed, as configured with rspec. This way two same-seeded rspec runs would generate identical test data.
Additional context
We're currently working around this by adding the following to our rspec configuration:
Describe the bug
Given an identical Kernel seed value, Faker should generate the same deterministic data, but it does not.
Seems to have been caused by #2226
To Reproduce
Given a conventional rspec test suite, with randomization enabled: the conventional rspec configuration sets the Kernel seed to the rspec seed:
Then
rspec --seed 1234
generates non-deterministic faker data.Expected behavior
I would expect Faker to be based on the Kernel.srand seed, as configured with rspec. This way two same-seeded rspec runs would generate identical test data.
Additional context
We're currently working around this by adding the following to our rspec configuration:
config.order = :random Kernel.srand config.seed + Faker::Config.random = Random.new(config.seed)
The text was updated successfully, but these errors were encountered: