diff options
author | Joe Sak <joe@joesak.com> | 2011-04-22 15:59:24 -0500 |
---|---|---|
committer | Joe Sak <joe@joesak.com> | 2011-04-22 16:05:08 -0500 |
commit | 7746f86dbf9bfe3c8cf2eaad88d9d87858e11dbe (patch) | |
tree | a57b4a8ba3e4d62bfbb5b5b2e85c871227519606 /features | |
parent | fe3bb08fcf7455bf446734e380e68bfc410886c3 (diff) | |
download | refinerycms-blog-7746f86dbf9bfe3c8cf2eaad88d9d87858e11dbe.tar.gz refinerycms-blog-7746f86dbf9bfe3c8cf2eaad88d9d87858e11dbe.tar.bz2 refinerycms-blog-7746f86dbf9bfe3c8cf2eaad88d9d87858e11dbe.zip |
have to explicitly require factory girl
Diffstat (limited to 'features')
-rw-r--r-- | features/support/factories/blog_categories.rb | 2 | ||||
-rw-r--r-- | features/support/factories/blog_comments.rb | 6 | ||||
-rw-r--r-- | features/support/factories/blog_posts.rb | 2 |
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." |