I answer that, Properly speaking, to tempt is to test the person tempted. Now we put a person to the test by words or by deeds. By words, that we may find out whether he knows what we ask, or whether he can and will grant it: by deeds, when, by what we do, we probe another's prudence, will or power. Either of these may happen in two ways. First, openly, as when one declares oneself a tempter: thus Samson (Judges 14:12) proposed a riddle to the Philistines in order to tempt them. In the second place it may be done with cunning and by stealth, as the Pharisees tempted Christ, as we read in Mt. 22:15, sqq. Again this is sometimes done explicitly, as when anyone intends, by word or deed, to put some person to the test; and sometimes implicitly, when, to wit, though he does not intend to test a person, yet that which he does or says can seemingly have no other purpose than putting him to a test.
Accordingly, man tempts God sometimes by words, sometimes by deeds. Now we speak with God in words when we pray. Hence a man tempts God explicitly in his prayers when he asks something of God with the intention of probing God's knowledge, power or will. He tempts God explicitly by deeds when he intends, by whatever he does, to experiment on God's power, good will or wisdom. But He will tempt God implicitly, if, though he does not intend to make an experiment on God, yet he asks for or does something which has no other use than to prove God's power, goodness or knowledge. Thus when a man wishes his horse to gallop in order to escape from the enemy, this is not giving the horse a trial: but if he make the horse gallop with out any useful purpose, it seems to be nothing else than a trial of the horse's speed; and the same applies to all other things. Accordingly when a man in his prayers or deeds entrusts himself to the divine assistance for some urgent or useful motive, this is not to tempt God: for it is written (2 Paralip 20:12): "As we know not what to do, we can only turn our eyes to Thee." But if this be done without any useful or urgent motive, this is to tempt God implicitly. Wherefore a gloss on Dt. 6:16, "Thou shalt not tempt the Lord thy God," says: "A man tempts God, if having the means at hand, without reason he chooses a dangerous course, trying whether he can be delivered by God."