There are a few ICs that look like transistors. Such as voltage regulators like the 78L05 or LP2950 and temperature sensors, such as the LM335, etc. So, as you point out, you can't always tell a part by it's cover. BUT, you _can _ attempt to look up the part number.
If you know the manufacturer, you can usually find a datasheet on their website, or look it up on Digi-Key and click on the "Specification Sheet" link--that is, if Digi-Key happens to carry that part. If the manufacturer is unavailable, then you can try Googling the part number. There is the rare case where dissimilar parts have the same, or similar part number. Usually they are different enough that you can discern the difference by physical characteristics. Otherwise, in a small percentage of cases you might just be screwed ;)
A note on determining the manufacturer: often there is a little symbol (icon) on the part. Often, this can be used to identify the manufacturer. Here are some sites that list manufacturers by their logo:
*
http://www.chipdocs.com/logos/logotypes.html?ReR=GG&ReR=GG*
http://www.advanced-tech.com/ic_logos/ic_logos.htm*
http://freespace.virgin.net/matt.waite/resource/logos/index.htm*
http://www.classiccmp.org/rtellason/logos/semiconductorlogos.html*
http://www.elnec.com/support/ic-logos/Found by Googling "electronic manufacturer logo identification".
_You, too, can Google with impunity!_