My policy is to never quit a job until i have another, and try to give 2 weeks notice, even if the job is shitty. That way you don't burn bridges and develop references. But if the job is completely horrible, its worth it to just quit.
For example, i would just quit amy's baking company, but I would suffer through a few weeks at a mcdonalds.