Using Standard In and Out In Ruby Code

My mentor, Kim Barnes, knocked it completely out of the park helping with my first question!

I sent her a very silly command line game that I've been working on.

My main questions was how can you test a game that has a lot of requests for input from the user?  

She took the time to generate the following examples:

A simple, hard to test engine

A simple, easy to test engine 

The test that matches the simple, easy to test engine

She also sent me a link an the article to better understand what was going on

I had asked her if it was common to have a lot of 'gets.chomp' style code in normal ruby programs, or if this was just something I had a lot of while I'm learning on simple command line games. Her response was gold!

Using gets/puts in production code is not that common, but could be useful for command line scripts.  But I think in general, the idea you're getting of making the code easy to test is the important part, and knowing how to stub gets/puts is just a detail you can research again later if you ever need it.