aboutsummaryrefslogtreecommitdiffstats
path: root/spec/factories
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2010-08-10 10:08:01 +1200
committerPhilip Arndt <parndt@gmail.com>2010-08-10 10:08:01 +1200
commit69026512c92f5d8173ceecf20a8c8cafb0966eb5 (patch)
tree9b087af43ef72f8b05ecc5da99b9aebfc53c855c /spec/factories
parentd999f08151817beb83b8bd2d3994f937c4fa0280 (diff)
parentbe4c8c3836e2d61edd516cac9ba1f4f0cb1ddf3b (diff)
downloadrefinerycms-blog-69026512c92f5d8173ceecf20a8c8cafb0966eb5.tar.gz
refinerycms-blog-69026512c92f5d8173ceecf20a8c8cafb0966eb5.tar.bz2
refinerycms-blog-69026512c92f5d8173ceecf20a8c8cafb0966eb5.zip
Merge remote branch 'neotericdesign/master'
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/blog_categories.rb4
-rw-r--r--spec/factories/blog_comments.rb10
-rw-r--r--spec/factories/blog_posts.rb4
3 files changed, 18 insertions, 0 deletions
diff --git a/spec/factories/blog_categories.rb b/spec/factories/blog_categories.rb
new file mode 100644
index 0000000..590e5b5
--- /dev/null
+++ b/spec/factories/blog_categories.rb
@@ -0,0 +1,4 @@
+Factory.define(:blog_category) do |f|
+ f.title "Shopping"
+ f.posts {|p| [p.association :post]}
+end \ No newline at end of file
diff --git a/spec/factories/blog_comments.rb b/spec/factories/blog_comments.rb
new file mode 100644
index 0000000..93beaf3
--- /dev/null
+++ b/spec/factories/blog_comments.rb
@@ -0,0 +1,10 @@
+Factory.sequence :email do |n|
+ "person#{n}@example.com"
+end
+
+Factory.define(:blog_comment) do |f|
+ f.name "Joe Commenter"
+ f.email { Factory.next(:email) }
+ f.body "Which one is the best for picking up new shoes?"
+ f.association :post
+end \ No newline at end of file
diff --git a/spec/factories/blog_posts.rb b/spec/factories/blog_posts.rb
new file mode 100644
index 0000000..6947e81
--- /dev/null
+++ b/spec/factories/blog_posts.rb
@@ -0,0 +1,4 @@
+Factory.define(:post, :class => BlogPost) do |f|
+ f.title "Top Ten 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."
+end \ No newline at end of file