-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add id method to Faker::Internet module #2955
Comments
I think we already have let(:user_id) { Faker::Number.number(digits: 10) } Hope this helps. 🙂 |
Hey @keshavbiswa, Thanks for the input! I see where you're coming from with the availability of However, having a dedicated Additionally, while So, while Thanks for considering this perspective! |
Hello,
I noticed that the
Faker::Internet
module does not currently have an id method. This would be a useful addition for generating random, unique numeric identifiers in tests.Here's an example of how it might be used:
This would generate a unique integer identifier each time it's called, which would be particularly useful for simulating database IDs in tests.
Thank you for considering this feature request.
The text was updated successfully, but these errors were encountered: