I took in a male stray when he was nearly 2 years old (according to vet). I had him in "quarantine" in my bathroom for 2 months due to an URI he had a hard time getting rid of due to his immune system being low. The first week he was too sick to spray I think. When he was strong/well enough I had him fixed. He's never sprayed.
I honestly think it depends on the cat and the reasons for the spraying. In some cases a cat will as a result of an issue be it environmental or medical.
So really there is no 100% guarantee, but if fixed the odds do work in your favor.