Example of spying on stdin/stdout

Based on: http://technicalpickles.com/posts/a-pattern-for-using-standard-in-and-out-in-your-ruby-code/