The Set Up
The Holy Spirit set up Christ. After Jesus was baptized by John the Baptist, it says the Holy Spirit led Jesus into a temptation by the devil.
Then Jesus was led up by the Spirit into the wilderness to be tempted by the devil. (Mat 4:1)
Obviously it was the Holy Spirit who set up Jesus for that temptation. Why did he do that? He did that because Jesus was the last Adam. Just as Adam was tempted in the garden so Jesus was tempted in the garden’s opposite, the wilderness, a desert. The temptation of Jesus lasted 40 days and it appears from Genesis 3 that the temptation of Adam took less than 40 seconds. When Eve told him to eat of the apple, he seemed to have done that willingly and quickly.
The New Testament tells us that God does not tempt us with evil but he does test us throughout our lives. We have the privilege of having the Holy Spirit with us in the testings of life and so we should rely on his presence and power when those occur. Jesus was faithful in his test, may we be so too.