require 'ta_te_ti' require 'test/unit' class JuegoTaTeTi < Test::Unit::TestCase def setup # si se define una variable de instancia, el juego no se actualiza aleatoriamente porqu solo hay una end def teardown #nada, la memoria se libera automaticamente end def test_play score = [] 30.times do ter_obj = TaTeTi::Game.new TaTeTi::DumbPlayer, TaTeTi::DumbPlayer score.push ter_obj.play end assert(score.uniq.length == 3, "score.uniq.length = #{score.uniq.length} score.length = #{score.length}") end end