How do you know this? Because you can see the type of fruit the tree produces.
But what if there were no fruit? Could you tell then?
Let it be a settled principle in our religion that when a person brings forth no fruits of the Spirit, they do not have the Holy Spirit within them. Let us resist as a deadly error the common idea, that all baptized people are born again, and that all members of the Church have the Holy Spirit. One simple question must be our rule: What fruit does a person bring forth? Do they repent? Do they believe with the heart on Jesus? Do they live a holy life? Do they overcome the world? Habits like these are what Scripture calls “fruit.” When these “fruits” are lacking, it is profane to talk of a person having the Spirit of God within them. – J.C. Ryle