aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJoe Sak <joe@joesak.com>2011-02-16 01:19:11 -0600
committerJoe Sak <joe@joesak.com>2011-02-16 01:22:29 -0600
commit69d65032f8fc53a19171bf21376daf168a4c7a10 (patch)
tree3b7ccf9e8bcc37aa2f74a245b6b90b6c8223a841 /spec
parenta4b02b13c32002a962040b645c8abd03af48fd84 (diff)
downloadrefinerycms-blog-69d65032f8fc53a19171bf21376daf168a4c7a10.tar.gz
refinerycms-blog-69d65032f8fc53a19171bf21376daf168a4c7a10.tar.bz2
refinerycms-blog-69d65032f8fc53a19171bf21376daf168a4c7a10.zip
The first shall be the .last, and the last shall be the .first
thanks to the default_scope :order_by published_at DESC
Diffstat (limited to 'spec')
-rw-r--r--spec/models/blog_posts_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/blog_posts_spec.rb b/spec/models/blog_posts_spec.rb
index c15d1da..f15cd64 100644
--- a/spec/models/blog_posts_spec.rb
+++ b/spec/models/blog_posts_spec.rb
@@ -126,7 +126,7 @@ describe BlogPost do
Factory(:post)
blog_post = Factory(:post, :published_at => Time.now + 1.minute)
blog_posts = BlogPost.all
- blog_posts.first.next.should == blog_post
+ blog_posts.last.next.should == blog_post
end
end