The Micropost migration. (Note the index on user_id and created_at.)
The initial Micropost spec
Tests for the validity of a new micropost
A validation for the microposts user_id
Tests for the microposts user association
A test for the users microposts attribute
A micropost belongs_to a user
A user has_many microposts
The complete factory file, including a new factory for microposts
Testing the order of a users microposts
Ordering the microposts with default_scope
Testing that microposts are destroyed when users are
Ensuring that a users microposts are destroyed along with the user
Tests for the Micropost model validations
The Micropost model validations
A test for showing microposts on the user show page
Adding microposts to the user show page
Adding _microposts in app/views/microposts directory
A partial for showing a single micropost
Adding an @microposts instance variable to the user show action