diff options
author | Uģis Ozols <ugis.ozolss@gmail.com> | 2013-10-17 08:32:11 +0300 |
---|---|---|
committer | Uģis Ozols <ugis.ozolss@gmail.com> | 2013-10-17 08:32:11 +0300 |
commit | 1ef84a1d5b55304f1a6e365c944ecc1d222ab8e3 (patch) | |
tree | 90fa714d05bb72fe35d402abd0ae52637b816663 /spec | |
parent | 5ae082d79e554d3449083aa70ef64ef5d677759a (diff) | |
download | refinerycms-blog-1ef84a1d5b55304f1a6e365c944ecc1d222ab8e3.tar.gz refinerycms-blog-1ef84a1d5b55304f1a6e365c944ecc1d222ab8e3.tar.bz2 refinerycms-blog-1ef84a1d5b55304f1a6e365c944ecc1d222ab8e3.zip |
Don't set tag_list on the post factory - it's not a required attribute.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/factories/blog_posts.rb | 1 | ||||
-rw-r--r-- | spec/models/refinery/blog/post_spec.rb | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/spec/factories/blog_posts.rb b/spec/factories/blog_posts.rb index ff4cf16..51c6b8a 100644 --- a/spec/factories/blog_posts.rb +++ b/spec/factories/blog_posts.rb @@ -3,7 +3,6 @@ FactoryGirl.define 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 author { FactoryGirl.create(:refinery_user) } diff --git a/spec/models/refinery/blog/post_spec.rb b/spec/models/refinery/blog/post_spec.rb index cec6a2f..bc9de6e 100644 --- a/spec/models/refinery/blog/post_spec.rb +++ b/spec/models/refinery/blog/post_spec.rb @@ -42,8 +42,10 @@ module Refinery it "acts as taggable" do post.should respond_to(:tag_list) - #the factory has default tags, including 'chicago' - post.tag_list.should include("chicago") + post.tag_list = "refinery, cms" + post.save! + + post.tag_list.should include("refinery") end end |