We should decide ahead of time how we will react when we are tempted, and act accordingly. The enemy will do all that he can to get us to fall prey to temptation, because he knows that if this happens, then he is able to take dominion over us in certain areas of our lives. Nobody avoids facing temptation. By the grace of God, we can avoid falling prey to it when it comes, but we cannot avoid being tempted. Even Jesus was tempted.
Temptation is the proving ground of life.
It demonstrates either that we have certain weaknesses or that God has granted us the strength of character to overcome. In a very real sense, temptation is a test. We either pass or we fail. Toward the end of his life, Peter passed the test that he had once failed, and he gave his life in martyrdom during the persecutions under Nero. Temptation is actually very helpful to us as a way of showing us if there are areas in our lives that are in need of improvement.