I saw on the history channel a British guy was showing some tactics behind the wars between the Scots and English. They had replicas of the spears/pikes that the Scotts used without a sharp metal tip for safety reasons. This guy on a horse tried to get in contact range of the spearmen but the horse refused. Now of course this was only done at trotting speeds and would have been cruel practice for the both the horse and the reenactors to attempt it at full charge speed.

The rider could only regain directional control of the horse when it was at a direction perpindicular to the spears or greater but not always immediately. Now granted this horse was'nt trained for infantry warfare and there are many variables. One simple fact is horses are animals and sometimes all you have to do is scare 1 horse to scare 50 more.

Horses had to be trained for the gunpwder era from my knowledge. You tied a horse to a post and fired a gun until the horse was no longer skiddish. So probably the most effective part of training a horse was training fear and natural instinct out of it.