Spraying pepper spray in front of a dog will do NOTHING except waste pepper spray. Pepper spray is not a gas (like CN or CS "tear gas"), but is a fine powder suspended in a liquid. To be effective, the fine powder must come in contact with the eyes, nose, or mouth of the dog (or human). So, you must be a good shot. Also, it does not instantly stop a dog or human. There is a one to two second delay. Spray and move. Also, pepper spray does not work on some humans under the influence of some stimulants.

In the past, when I have been presented with a choice for close-in protection, I chose either a shotgun or impact weapon (if guns are not your thing or illegal where you are). Whatever happens, if you are attacked by a dog, expect to be bitten. Humans are usually easier to deal with, as many respond to the psychological deterent of a weapon (firearm or impact). A dog that is going to attack you will not be intimidated.
_________________________
"We are not allowed to stop thinking"