pushing befor major changes
This commit is contained in:
@@ -84,4 +84,17 @@ RSpec.describe Game do
|
||||
expect(game.get_captured_planets(player.get_id)).to eq game.instance_variable_get(:@planets)
|
||||
end
|
||||
end
|
||||
|
||||
describe '#find_player' do
|
||||
it 'returns false if the player is not in the game' do
|
||||
game = Game.new()
|
||||
expect(game.find_player('bill')).to eq false
|
||||
end
|
||||
|
||||
it 'returns true if the player is in the game' do
|
||||
game = Game.new(planets: 1)
|
||||
game.add_player(Player.new(name: 'bob'))
|
||||
expect(game.find_player('bob')).to eq true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user