Skip to content

Commit

Permalink
Improved the sequence documentation, related to beam-community#223
Browse files Browse the repository at this point in the history
  • Loading branch information
suhrawardi committed Jun 29, 2017
1 parent 74814ed commit d6cffc5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ex_machina.ex
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ defmodule ExMachina do
def user_factory do
%{
# Will generate "me-0@example.com" then "me-1@example.com", etc.
email: sequence(:email, &"me-\#{&1}@foo.com")
email: sequence(:email, &"me-\#{&1}@foo.com"),
# Will generate "admin" then "user", "other", "admin" etc.
role: sequence(:role, ["admin", "user", "other"])
}
end
"""
Expand Down

0 comments on commit d6cffc5

Please sign in to comment.