Fixed test errors on ruby 1.9.3

Object.const_get() doesn’t recognise namespaces in ruby 1.9.3.