Cymen Vig

Software Craftsman

Day 14: Reviewed HTTP-based tic-tac-toe with Doug

Doug reviewed my tic-tac-toe project to see the progress I’d made on the HTTP implementation. We discussed some of the aspects of testing that were difficult. He is going to return with the next challenge but in the mean time I’ll work on making sure my HTTP-based tic-tac-toe using Sinatra is completely tested. I split my state interactions off to a TicTacToeStorageSession class which made testing easier as I could inject the session as a hash instead of a Rack session (the Ruby hash has the same interface as the session for my purposes).

I added more testing of to the project. Testing the “actions” in my Sinatra-based tic-tac-toe application was straight forward and thankfully there are few of them. I also added more testing to other parts of the application where prior refactoring exposed methods to use to set values for testing of functions that use those values (typically, along with other input).