Refactor .transforms spec