Sha256: b6d1352ee8413031e9cbbe7eec94c7ed9b7935f459997788d37539fb060fd10e
Contents?: true
Size: 636 Bytes
Versions: 1
Compression:
Stored size: 636 Bytes
Contents
require 'test/unit' require 'scottkit/game' require 'stringio' require 'scottkit/withio' class TestPlay < Test::Unit::TestCase #:nodoc: def test_play_tutorial7; play("t7"); end def test_play_crystal; play("crystal"); end def play(name) game = ScottKit::Game.new({ :read_file => "games/test/#{name}.solution", :random_seed => 12368, :no_wait => true }) game.load(IO.read("games/test/#{name}.sao")) f = StringIO.new withIO(nil, f) { game.play } expected = File.read("games/test/#{name}.transcript") assert_equal(expected, f.string) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
scottkit-1.6.0 | test/test_play.rb |