Fix retry_limit spec bug
Refactor specs