Is bear spray (pepper spray specially formulated to be effective against bear attacks) effective against other animals, especially mountain lions or wolves? Or is there something in it specifically targeted towards bears that would make it less effective on other attacking animals?
Given that the active ingredient is capsaicin which is used in self-defence sprays for all types of purposes, bear spray should be effective on anything with tear ducts, soft tissue, sinuses, eyeballs, etc, (and will totally dominate a bean burrito**).
The discriminating difference between "bear spray" vs "self-defense" spray, vs. law enforcement "occupy-protester" spray is a combination of volume, range, spray pattern, and percent capsaicin and oleoresin capsicum (capsaicin is what gives the spray the "heat" ranging in the 1-3% range, while oleoresin capsicum is pepper oil extract that contains the capsaicin).
Other than that, it is all essentially the same stuff, and has been used effectively against bear, moose, dogs, cats, and people.
However, as pointed out in other answers, each animal's behavior / attack pattern varies, meaning your ability to implement pepper spray in a timely effective manner may be limited. Knowing what threats are in the area you are traveling, and the best way to prevent an encounter in the first place is your BEST plan.
**NOTE: although capsaicin IS the same thing that gives chillies their heat, (and in fact is isolated from chillies) DO NOT use bear spray or other self defense sprays as a flavor enhancer. I point it out as a segue to illustrate that Pepper spray is only effective as an active counter-attack measure sprayed directly in the face of an assailant, and should NOT be used as a "repellent." There have been reports of people spraying bear-spray on their tents and sleeping bags like mosquito repellent which is basically the same as turning yourself into bear-sized buffalo wings.
According to this account: http://missoulian.com/news/state-and-regional/idaho-bicyclist-rescued-from-pursuing-wolf/article_db0bef64-ea50-11e2-ad52-001a4bcf887a.html bear spray did not deter this particular wolf (dog?). So, case study of 1...
Chemically, if you can use it, I see no reason why it wouldn't work on any similar animals - though practically it may not be as effective. In terms of cougars for instance, this seems to imply it'll work if you can get it out and use it in time, but because of their nature the chances of you being able to carry out the task successfully are dramatically less for a cougar than a bear.
Most material seems to imply that for wolves it's better to make yourself look big (less like prey), get children behind you and face the wolf rather than using spray, so I'd try that first and hopefully it won't get on close enough quarters to warrant using the spray!