Skip to content

Instantly share code, notes, and snippets.

@pumpkincouture
Created July 30, 2014 18:26
Show Gist options
  • Save pumpkincouture/311ce057d0841266d6cf to your computer and use it in GitHub Desktop.
Save pumpkincouture/311ce057d0841266d6cf to your computer and use it in GitHub Desktop.
#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