refactoring spec file