refactor: spec formatting and DRYing up specs