Everything broken, restore tests

This commit is contained in:
2019-10-12 17:52:39 +03:00
parent dacecf2aa8
commit 658d3b7288
9 changed files with 308 additions and 259 deletions

View File

@ -1,21 +1,3 @@
require "./spec_helper"
describe "World" do
it "should build crystal harvester" do
world = Game::World.new create_map_2x2
point = Game::Point.new 1, 0
cmd = Game::BuildCrystalHarvesterCommand.new(point)
world.push(cmd)
world.run(100)
world.map.get(point).has_role(Game::TileRole::CrystalHarvester)
end
it "should fail when not enought resources" do
world = Game::World.new create_map_2x2
point = Game::Point.new 1, 0
cmd = Game::BuildCrystalRestorerCommand.new(point)
expect_raises(Game::NotEnoughtResources) do
world.push(cmd)
end
end
end
# @todo World tests