aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/refinery/blog/post_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/refinery/blog/post_spec.rb')
-rw-r--r--spec/models/refinery/blog/post_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/models/refinery/blog/post_spec.rb b/spec/models/refinery/blog/post_spec.rb
index bc9de6e..8b156cb 100644
--- a/spec/models/refinery/blog/post_spec.rb
+++ b/spec/models/refinery/blog/post_spec.rb
@@ -95,8 +95,10 @@ module Refinery
end
it "returns all posts which aren't in draft and pub date isn't in future" do
- described_class.live.count.should be == 2
- described_class.live.should == [@post2, @post1]
+ live_posts = described_class.live
+ live_posts.count.should be == 2
+ live_posts.should include(@post2)
+ live_posts.should include(@post1)
end
end
@@ -135,7 +137,7 @@ module Refinery
end
it "returns next article when called on current article" do
- described_class.last.next.should == @post
+ described_class.newest_first.last.next.should == @post
end
end