Right there is no minimum time, technically you could get off social assistance and sponsor your spouse the next day.
However any recent receipt of social assistance will trigger an investigation during the sponsor review, so you can expect longer than usual processing. Also we have seen several cases where even though someone stopped receiving payments, they were accidentally left on the list of active recipients so their sponsorship was rejected. So before attempting to sponsor make sure you get written proof from the necessary government area that you are officially and completely removed from all social assistance lists.