By my experience, trusting your intuition is best. I had made what you'd call a "best friend" on 10th grade. We were really quick to get to know each other. We met at September for the first time, I remember I came out to him 2 months later and as I expected, he was okay with it. I was confident about his open-mindedness so I went on to even confess my kinky side and all went well.
If you aren't sure like I was in the situation above, another way is to get to hear their view on homosexuality. It's probably the safest and most effective way if you have the patience and the skills to draw his opinion out. For example, after my so-called "best friend" wanted to have more friends than just one and stopped talking to me (having me as a friend caused a lot of people to avoid him since he was hanging out with an expressionless weird guy), I started talking with another guy who at first sight seemed somewhat mature and smart, though not a great student. I managed to indirectly mention homosexuality, knowing he wouldn't resist commenting on it. His view was completely immature, could easily be related to the opinion a person from the middle ages would have and he was immensely radiating insecurity. This caused me to gradually withdraw from this person.
On side note, I experimented by telling a trustworthy, smart, but religious girl I sometimes talked to at school via Facebook. It worked well, better than I initially expected, even though she was hesitant on accepting homosexuality. It probably gave her space and time to think it over.