I think I've heard somewhere that pepper spray attracts bears after the fact, i.e. don't spray it on something (like your tent) and expect it to keep the bears away. It is, after all, based on a food product but in VERY concentrated form.
_________________________
If I wouldn't eat it at home, why would I want to eat it on the trail?