Skip to content

Use deterministic helper to execute the test provided in the block successive number of times #2813

Closed
@stefannibrasil

Description

@stefannibrasil

faker has a deterministic_verify test helper that we can use for verifying the randomness of generators multiple times.

We have some tests using 10.times, 100.times, 1000.times blocks that we want to replace with the test helper mentioned above. Here are some examples of places that can be improved using the deterministic helper:

And other examples of tests using the helper:

https://github.com/faker-ruby/faker/blob/main/test/faker/default/test_faker_internet.rb#L61

Expected Outcomes

  • replace existing tests using loops with the deterministic helper

This issue is great for a beginner, so please choose another way to contribute to faker if you have already contributed to other open source projects.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions