require 'tres-raya' require 'test/unit' class TestTresRaya < 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 = TresRaya::Game.new TresRaya::DumbPlayer, TresRaya::DumbPlayer score.push ter_obj.play end assert(score.uniq.length == 3, "score.uniq.length = #{score.uniq.length} score.length = #{score.length}") end end