Created
July 30, 2014 18:26
-
-
Save pumpkincouture/311ce057d0841266d6cf 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
#the method | |
def welcome | |
puts "Welcome to a Simpler Tic Tac Toe. The computer will go first." | |
@board.board["5"]="X" | |
puts "The computer chose space number 5." | |
@board.display_board | |
self.decrease_space | |
end | |
#the test | |
describe "#welcome" do | |
it "welcomes the player by inputting a string and then calls methods. Check if it calls the board with no parameters." do | |
expect {subject.board (:hello) }.to raise_error | |
end | |
it "checks if it calls the board instance" do | |
expect {subject.board.should_receive(:nil)}.and_return(subject.board) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment