Here are two ways: 

1) First reduce the fraction to lowest terms. That is, cancel out all common factors between the numerator and denominator. If the denominator has a prime factor other than 2 or 5, it will not terminate. Otherwise it will terminate. (If the denominator is 1, it will also terminate.) 

2) Let's say the denominator is d and assume the numerator and denominator are integers. Start doing the division and carry it out to d places. If it hasn't terminated yet, it never will. For example, if you divide by 30, carry out the division to 30 decimal places. It will terminate by then if it is ever going to. Of course, reducing the fraction will minimize the number of decimal places that you need to calculate.