From dbb02d953f55ed2171d778617c14affcd17bcfe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=C4=A3is=20Ozols?= Date: Sat, 13 Aug 2011 21:57:43 +0300 Subject: Move factories under spec dir so that they get picked up by spec_helper. --- refinerycms-blog.gemspec | 9 +++++---- spec/factories/blog_categories.rb | 5 ----- spec/factories/blog_comments.rb | 8 -------- spec/factories/blog_posts.rb | 9 --------- spec/support/factories/blog_categories.rb | 5 +++++ spec/support/factories/blog_comments.rb | 8 ++++++++ spec/support/factories/blog_posts.rb | 9 +++++++++ 7 files changed, 27 insertions(+), 26 deletions(-) delete mode 100644 spec/factories/blog_categories.rb delete mode 100644 spec/factories/blog_comments.rb delete mode 100644 spec/factories/blog_posts.rb create mode 100644 spec/support/factories/blog_categories.rb create mode 100644 spec/support/factories/blog_comments.rb create mode 100644 spec/support/factories/blog_posts.rb diff --git a/refinerycms-blog.gemspec b/refinerycms-blog.gemspec index 443a178..a7ba8fe 100644 --- a/refinerycms-blog.gemspec +++ b/refinerycms-blog.gemspec @@ -5,7 +5,7 @@ Gem::Specification.new do |s| s.name = %q{refinerycms-blog} s.version = %q{2.0.0} s.description = %q{A really straightforward open source Ruby on Rails blog engine designed for integration with RefineryCMS.} - s.date = %q{2011-08-12} + s.date = %q{2011-08-13} s.summary = %q{Ruby on Rails blogging engine for RefineryCMS.} s.email = %q{info@refinerycms.com} s.homepage = %q{http://refinerycms.com/blog} @@ -206,9 +206,6 @@ Gem::Specification.new do |s| script/rails spec spec/factories - spec/factories/blog_categories.rb - spec/factories/blog_comments.rb - spec/factories/blog_posts.rb spec/models spec/models/refinery spec/models/refinery/blog_category_spec.rb @@ -223,6 +220,10 @@ Gem::Specification.new do |s| spec/support spec/support/database_cleaner.rb spec/support/devise.rb + spec/support/factories + spec/support/factories/blog_categories.rb + spec/support/factories/blog_comments.rb + spec/support/factories/blog_posts.rb spec/support/refinery.rb todo.md ) diff --git a/spec/factories/blog_categories.rb b/spec/factories/blog_categories.rb deleted file mode 100644 index 31ec28b..0000000 --- a/spec/factories/blog_categories.rb +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 0bb5206..0000000 --- a/spec/factories/blog_comments.rb +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 4586b36..0000000 --- a/spec/factories/blog_posts.rb +++ /dev/null @@ -1,9 +0,0 @@ -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 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 -- cgit v1.2.3