To determine if a ruby has been treated, gemologists use a variety of tests, including microscopic examination, X-ray diffraction, and spectroscopy. Heat treatment, for example, can cause changes in the crystal structure of the gem, which can be detected through these tests.