extract common ruby tests between 1.8.7 and 1.9