Did you see that? Jesus was full of the Spirit. Jesus was led by the Spirit. Where did the Holy Spirit lead Jesus? Into a time of testing and temptation. He was doing what God's Spirit had called him to do, and in doing that, he was tested.
According to James 1:13-14, "When tempted, no one should say, 'God is tempting me.' For God cannot be tempted by evil, nor does he tempt anyone, but each one is tempted when, by his own evil desire, he is dragged away and enticed." God does not tempt. We are tempted by the devil, as Jesus was. We are tempted by our own evil desire. In short, God tests, but he does not tempt. (The word in the original language is used for both 'test' and 'tempt.') Thus, God tested Jesus in the wilderness, and the devil tempted him.
Now let me get to my main point. This passage illustrates that as we seek to be obedient to God we may be led into times of testing and temptation. There is a however. If God leads us into a time of testing, know that he has provided all the resources to pass the test. His most important resource is his very own Spirit. If we are obeying God's leading to do something, and we do it, even if temptation comes, know that you have the ability through God to resist that temptation. For example, pretend God has led you into a diet. As you do the diet, he may also lead you into situations where luscious desserts are offered. However, you do not need to eat, as much as your salivary glands might long for it, because you have the power of God to resist. (I use this example, because I recently completed a fast from desserts.)
In short, God might lead you into a time of testing and temptation. But he does so, knowing that he has given you the power and strength to pass the test and to resist any temptation through his Spirit. Do you know you have the power to say "No!" to temptation? You do! Through the power of the Holy Spirit of God, you do!