Testing through ruby code