diff options
author | Jamie Winsor <jamie@enmasse.com> | 2011-08-04 13:59:51 -0700 |
---|---|---|
committer | Jamie Winsor <jamie@enmasse.com> | 2011-08-04 15:11:05 -0700 |
commit | 8bd056e3e8baa108b2e10e460ceeeed3ec7c4c86 (patch) | |
tree | 5e095d1a675daabf26e8cc0472bae433257b7616 /spec/factories | |
parent | 84a2fcdf08430c70cb4da8c678c2d72e8ca54628 (diff) | |
download | refinerycms-blog-8bd056e3e8baa108b2e10e460ceeeed3ec7c4c86.tar.gz refinerycms-blog-8bd056e3e8baa108b2e10e460ceeeed3ec7c4c86.tar.bz2 refinerycms-blog-8bd056e3e8baa108b2e10e460ceeeed3ec7c4c86.zip |
Replace category.features with capybara rspec requests
Update FactoryGirl factory definition syntax
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/blog_categories.rb | 6 | ||||
-rw-r--r-- | spec/factories/blog_comments.rb | 12 | ||||
-rw-r--r-- | spec/factories/blog_posts.rb | 14 |
3 files changed, 19 insertions, 13 deletions
diff --git a/spec/factories/blog_categories.rb b/spec/factories/blog_categories.rb index c3701dd..31ec28b 100644 --- a/spec/factories/blog_categories.rb +++ b/spec/factories/blog_categories.rb @@ -1,3 +1,5 @@ -Factory.define :blog_category, :class => 'refinery/blog_category' do |f| - f.sequence(:title) { |n| "Shopping #{n}" } +FactoryGirl.define do + factory :blog_category, :class => 'refinery/blog_category' do + sequence(:title) { |n| "Shopping #{n}" } + end end diff --git a/spec/factories/blog_comments.rb b/spec/factories/blog_comments.rb index d738cac..0bb5206 100644 --- a/spec/factories/blog_comments.rb +++ b/spec/factories/blog_comments.rb @@ -1,6 +1,8 @@ -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 +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/factories/blog_posts.rb b/spec/factories/blog_posts.rb index 548636d..4586b36 100644 --- a/spec/factories/blog_posts.rb +++ b/spec/factories/blog_posts.rb @@ -1,7 +1,9 @@ -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 +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 |