Update spec to use Sinon for easy restore