If you want a good chance of succeeding on the hanging obstacles on a Spartan Race, you're going to have to train your grip and learn to swing like a primate!
While being able to do pull-ups is great, it's not really necessary if you have a strong grip and good technique. It's also less important how long you can statically hang than it is to be able to grip HARD and release over and over again.
Combined with that, it is important to learn how to properly move your body in space while hanging to control your momentum and smoothly load / unload your hands. This can help you to be much more confident in transitioning from one grip event to the next as you move through the obstacles.
Put it all together, and you have brachiation.