Skip to content
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

cycle/2 with an id #193

Open
zimt28 opened this issue Aug 27, 2018 · 0 comments
Open

cycle/2 with an id #193

zimt28 opened this issue Aug 27, 2018 · 0 comments

Comments

@zimt28
Copy link

zimt28 commented Aug 27, 2018

faker already has a cycle function, but it would be great if it could be used with an id instead of a pid. This would make tests much easier, as there's no need to keep track of the cycle process manually:

assert Helper.cycle(:fake, ["peter", "paris", "london"]) == "peter"
assert Helper.cycle(:fake, ["peter", "paris", "london"]) == "paris"
assert Helper.cycle(:fake, ["peter", "paris", "london"]) == "london"
assert Helper.cycle(:fake, ["peter", "paris", "london"]) == "peter"
assert Helper.cycle(:fake, ["peter", "paris", "london"]) == "paris"
assert Helper.cycle(:fake, ["peter", "paris", "london"]) == "london"

(Copied from faker-elixir)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant