Created
December 3, 2013 03:15
-
-
Save tarynsauer/7763338 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
describe 'UI' do | |
context 'player move messages' do | |
before :each do | |
board = double('board') | |
@ui = UI.new(board) | |
@player = double('player', :marker => 'X' ) | |
end | |
describe '#first_move_message' do | |
it "prints a message with the player's marker" do | |
printed = capture_stdout { @ui.first_move_message(@player) } | |
printed.should include("Player 'X'") | |
end | |
end | |
describe '#next_move_message' do | |
it "prints a message with the player's marker" do | |
printed = capture_stdout { @ui.next_move_message(@player) } | |
printed.should include("Player 'X'") | |
end | |
end | |
describe '#winning_game_message' do | |
it "prints a message with the player's marker" do | |
printed = capture_stdout { @ui.winning_game_message(@player) } | |
printed.should include("Player 'X'") | |
end | |
end | |
... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment