have to explicitly require factory girl
This commit is contained in:
parent
fe3bb08fcf
commit
7746f86dbf
3 changed files with 6 additions and 4 deletions
|
@ -1,3 +1,5 @@
|
|||
require 'factory_girl'
|
||||
|
||||
Factory.define(:blog_category) do |f|
|
||||
f.sequence(:title) { |n| "Shopping #{n}" }
|
||||
end
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
Factory.sequence :email do |n|
|
||||
"person#{n}@example.com"
|
||||
end
|
||||
require 'factory_girl'
|
||||
|
||||
Factory.define(:blog_comment) do |f|
|
||||
f.name "Joe Commenter"
|
||||
f.email { Factory.next(:email) }
|
||||
f.sequence(:email) { |n| "person#{n}@example.com" }
|
||||
f.body "Which one is the best for picking up new shoes?"
|
||||
f.association :post
|
||||
end
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
require 'factory_girl'
|
||||
|
||||
Factory.define(:post, :class => BlogPost) do |f|
|
||||
f.sequence(:title) { |n| "Top #{n} Shopping Centers in Chicago" }
|
||||
f.body "These are the top ten shopping centers in Chicago. You're going to read a long blog post about them. Come to peace with it."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue