Add correct ids to snippet headers

* Add RSpec
* Extract `anchor_from_title` to a helper