I told a homeless person to spend the money I gave him on food.
Why did you tell him that?
I was just trying to see if his story is true or not
People should spend the money however they want. When people are hungry, of course they will spend it on food, and if they have other pressing needs, they can use the money for those.  It doesn't affect you, either way.
I think the dude was just getting lazy.
It was generous of you to give money to someone who needs it, but you should consider it a gift, and not try to set conditions on how it is used.  This man may appear lazy to you, but hunger will rob someone of their energy.