Header Right

Ruby Unit Testing Framework in 44 Lines of Code

When it comes to unit testing, I think that many developers want to do it but project timelines or business requirements make it difficult to provide a convincing case for building it into the scope of the work to be done.

On top of that, I think that the amount of time required to setup and configure testing environments are often higher than they should be, so I appreciate it when I see other projects or developers coming up with creative ways to handle unit testing in a quicker fashion.

Alan Skorkin has written a unit testing framework in 44 lines of Ruby:

Although this approach misses out on certain aspects of more mature frameworks such as improved messaging, support for mock objects, stubbing out classes, and so on, this is certainly better than simply launching something without testing.