aboutsummaryrefslogtreecommitdiffstats
path: root/features
diff options
context:
space:
mode:
Diffstat (limited to 'features')
-rw-r--r--features/support/factories/blog_categories.rb2
-rw-r--r--features/support/factories/blog_comments.rb6
-rw-r--r--features/support/factories/blog_posts.rb2
3 files changed, 6 insertions, 4 deletions
diff --git a/features/support/factories/blog_categories.rb b/features/support/factories/blog_categories.rb
index b2de802..2b47a87 100644
--- a/features/support/factories/blog_categories.rb
+++ b/features/support/factories/blog_categories.rb
@@ -1,3 +1,5 @@
+require 'factory_girl'
+
Factory.define(:blog_category) do |f|
f.sequence(:title) { |n| "Shopping #{n}" }
end
diff --git a/features/support/factories/blog_comments.rb b/features/support/factories/blog_comments.rb
index d5c5b1d..af364be 100644
--- a/features/support/factories/blog_comments.rb
+++ b/features/support/factories/blog_comments.rb
@@ -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
diff --git a/features/support/factories/blog_posts.rb b/features/support/factories/blog_posts.rb
index 3eecf53..33f6b93 100644
--- a/features/support/factories/blog_posts.rb
+++ b/features/support/factories/blog_posts.rb
@@ -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."