Guest User

Untitled

a guest
Jun 22nd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. describe Post, 'in general' do
  2.  
  3. it "should have recent named scope default to limit 5" do
  4. recent_scope = { :limit => 5, :order => "created_at DESC" }
  5. Post.recent.proxy_options.should == recent_scope
  6. end
  7.  
  8. it "should have recent named scope accepting limit as argument" do
  9. recent_scope = { :limit => 10, :order => "created_at DESC" }
  10. Post.recent(10).proxy_options.should == recent_scope
  11. end
  12.  
  13. end
Add Comment
Please, Sign In to add comment