refactoring checkout command spec