Translate some tests into ruby