Created
May 4, 2009 13:29
-
-
Save heim/106464 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
Factory.define :category do |c| | |
c.sequence(:name) { |n| "Category #{n}" } | |
end | |
Factory.define :post do |p| | |
p.sequence(:title) { |n| "Title#{n}" } | |
p.body "Body" | |
p.categories [Factory(:category), Factory(:category)] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment