Refactoring: made some specs into templates to DRY them up