Created
October 3, 2016 20:00
-
-
Save jah2488/0b88e84141bc48ae36cf1d567a844d01 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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