DRY up the error spec.