Yes, I'd go along with the student too - for me it can be used any time someone decides to act positively in a difficult situation where it would be easy to give up. So rather a rejection of negative thinking than necessarily a change.
I found this in an old
Time article -
Before leaving Fort Bragg, President Kennedy visited 300 men of the 82nd who had not participated in the performance; they had been on combat alert. One paratrooper startled the President by shouting in his face: "Airborne, all the way!" Replied the President of the U.S., with every reason to mean what he said: "That's the spirit."
It's an expression to give encouragement or approval to thinking and acting in a way which would overcome obstacles.