To run the code you must follow the commands below:
gem install riot # or sudo gem intall riot
git clone git://gist.github.com/1193748.git
cd 1193748
ruby -I. countdown_test.rb
I choose use riot as test framework. I'm using it in some small projects and I'm liking it a lot.
About the code, I tried to build it using the simplest way instead of make it too complex and hard to understand. I think it's not finding all possible results for all input sources. An example of this is the last test, as I commented there, the closest result was not what the test is checking. Also, I put a timeout of 30 seconds, like the original game. I don't know if I should do this, but I tried to keep in the same format as it's showed on TV :)