Add test for exception with custom #to_s method