Refactored error-generation spec to use inline fixture