diff options
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/factories/blog_categories.rb | 5 | ||||
-rw-r--r-- | spec/support/factories/blog_comments.rb | 8 | ||||
-rw-r--r-- | spec/support/factories/blog_posts.rb | 9 |
3 files changed, 22 insertions, 0 deletions
diff --git a/spec/support/factories/blog_categories.rb b/spec/support/factories/blog_categories.rb new file mode 100644 index 0000000..31ec28b --- /dev/null +++ b/spec/support/factories/blog_categories.rb @@ -0,0 +1,5 @@ +FactoryGirl.define do + factory :blog_category, :class => 'refinery/blog_category' do + sequence(:title) { |n| "Shopping #{n}" } + end +end diff --git a/spec/support/factories/blog_comments.rb b/spec/support/factories/blog_comments.rb new file mode 100644 index 0000000..0bb5206 --- /dev/null +++ b/spec/support/factories/blog_comments.rb @@ -0,0 +1,8 @@ +FactoryGirl.define do + factory :blog_comment, :class => 'refinery/blog_comment' do + name "Joe Commenter" + sequence(:email) { |n| "person#{n}@example.com" } + body "Which one is the best for picking up new shoes?" + association :post, :factory => :blog_post + end +end diff --git a/spec/support/factories/blog_posts.rb b/spec/support/factories/blog_posts.rb new file mode 100644 index 0000000..4586b36 --- /dev/null +++ b/spec/support/factories/blog_posts.rb @@ -0,0 +1,9 @@ +FactoryGirl.define do + factory :blog_post, :class => 'refinery/blog_post' do + sequence(:title) { |n| "Top #{n} Shopping Centers in Chicago" } + 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." + draft false + tag_list "chicago, shopping, fun times" + published_at Time.now + end +end |