Created
June 30, 2011 19:19
-
-
Save jcasimir/1056988 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fabricate(:person) do | |
ssn { sequence(:ssn, 111111111) } | |
email { sequence(:email) { |i| "user#{i}@example.com" } } | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sometimes I do this... | |
people = [] | |
3.times{ people << Fabricate(:person) } | |
# Which seems like too much work. What do you think about something like... | |
Fabricate(:person, 3) # returns an array of 3 Person instances | |
# Other ideas: | |
Fabricate(:person).quantity(3) | |
Fabricate(3, :person) | |
Fabricate(3, :people) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fabricate(:person) do | |
ssn { sequence(111111111) } | |
email { sequence{ |i| "user#{i}@example.com" } } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment