Skip to content

Instantly share code, notes, and snippets.

@jah2488
Created October 3, 2016 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jah2488/0b88e84141bc48ae36cf1d567a844d01 to your computer and use it in GitHub Desktop.
Save jah2488/0b88e84141bc48ae36cf1d567a844d01 to your computer and use it in GitHub Desktop.
it 'sets the state to "gameover" when there is a winner' do
game = Game.new
game.state = "running"
expect { game.winner! }.to change { game.state }.from("running").to("gameover")
end
it 'gives me the players current state' do
game = Game.new
game.player = Player.new
expect(game.player_state).to eq("Started")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment