aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2012-02-10 00:48:52 -0800
committerPete Higgins <pete@peterhiggins.org>2012-02-10 01:07:15 -0800
commitdee1a9d539b7efe43a54f589e1826b1cf1bafa58 (patch)
tree863ab65b7a3680a3c89edbd6844d861dbc9a527f /spec/models
parentf140ed284f88a2a06846df124aedd08236169b33 (diff)
downloadrefinerycms-blog-dee1a9d539b7efe43a54f589e1826b1cf1bafa58.tar.gz
refinerycms-blog-dee1a9d539b7efe43a54f589e1826b1cf1bafa58.tar.bz2
refinerycms-blog-dee1a9d539b7efe43a54f589e1826b1cf1bafa58.zip
Avoid creating some database records.
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/refinery/blog/post_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/refinery/blog/post_spec.rb b/spec/models/refinery/blog/post_spec.rb
index a781aef..acc4f95 100644
--- a/spec/models/refinery/blog/post_spec.rb
+++ b/spec/models/refinery/blog/post_spec.rb
@@ -114,15 +114,15 @@ module Refinery
describe "#live?" do
it "returns true if post is not in draft and it's published" do
- FactoryGirl.create(:blog_post).live?.should be_true
+ Factory.build(:blog_post).should be_live
end
it "returns false if post is in draft" do
- FactoryGirl.create(:blog_post, :draft => true).live?.should be_false
+ Factory.build(:blog_post, :draft => true).should_not be_live
end
it "returns false if post pub date is in future" do
- FactoryGirl.create(:blog_post, :published_at => Time.now.advance(:minutes => 1)).live?.should be_false
+ Factory.build(:blog_post, :published_at => Time.now.advance(:minutes => 1)).should_not be_live
end
end