My friend was put into rehab by her family member, and she still smoked until she found out she had to actually pass a drug test to get out legally. So, she stopped smoking and they gave her a date of when she'd have to test.
She stopped smoking and five weeks later, PASSED.

Now, that may not sound like a big feat, but she had literally smoked EVERY day (she even smoked when she had step throat!) for 11 months. She's about 130, 5'8 or 5'9, so she's not fat at all, but she also doesn't work or anything. So, I'd say in five weeks you'll easily pass a drug test unless you're (NO OFFENSE) morbidly obese and your body has a very hard time getting the metabolites out of your system.

Working out gets the metabolites into your piss much quicker, meaning you can pass a test sooner but you it really does depend on your weight, height, and your build etc etc.