Not a Ruby response per-se, but I tend to be very function orientated when I code. On completion of each new (as in never written it before) function I add a test call to the function at the top of my main module followed by an 'exit/end' statement. I then compile and run, and ensure the function works with test data. If it passes I then use the function in the code flow as normal and comment out the test call, if it doesn't pass, I tweak it until it does.
I guess this is a form of unit testing, although I never seen anyone talk about it in this way.