Refactor spec file.