Add specs for before and after hooks