Are mushrooms fruit?
The context of shaking the dust off the feet is in relation to doctrine. If the household or town in Matt.10 wouldn't hear the disciples words (teaching, doctrine) the truth regarding the Lord Jesus Christ, they were to shake the dust off, which was kind of an insult in that culture, and head for another city.
There are many passages regarding 'fruit', with different contexts. The passage in Matthew 7 is referring to false prophets. Again, doctrine.
(lifestyle too, of course, should line up with ones teaching, but is not as readily discernable, as the false prophet is a wolf disguised in sheep's clothing. They can SEEM nice enough, but they distort or even deny the truth of the gospel.)
A good tree (true prophet) can't bring forth evil fruit (false teaching) and a corrupt tree (false prophet) can't bring forth good fruit (true doctrine) We as believers are told that we shall know them (true or false prophets) by their fruits (doctrine and faith).
"By him therefore let us offer the sacrifice of praise to God continually, that is, the fruit of our lips giving thanks to his name. But to do good and to communicate forget not : for with such sacrifices God is well pleased." Heb. 13:15-16