unittest ruby snippet