refactored error_message specs