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