Created
November 2, 2017 18:03
-
-
Save domagude/ef0d03034b36e963a19bd39956e32446 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context 'Scopes' do | |
it 'default_scope orders by descending created_at' do | |
first_post = create(:post) | |
second_post = create(:post) | |
expect(Post.all).to eq [second_post, first_post] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment