Add pending state for spec helper functions.
Add spec helper function for expecting errors.