ruby
< programming
< jeromegomez
Get flash to fully experience Pearltrees
Unit testing is a great way to catch errors early in the development process, if you dedicate time to writing appropriate and useful tests. As in other languages, Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit. There are other very popular testing frameworks, rspec and cucumber come to mind. Specifically, Test::Unit provides three basic functionalities:
Note: This post is inspired by JEG2’s excellent code reading talk at MWRC 2009, called LittleBIGRuby. Go watch it if you have time, then come back and read this. You might also want to check out the Question 5 Ways interview at Pat Eyler’s “On Ruby” blog for more code reading goodness.
What is Readline? The GNU Readline Library’s website sums it up best: The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in. (…) The Readline library includes additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands. Users that have worked with the shell are very familiar with readline. This is the library that provides ⌃A , ⌃E , ↑ , ↓ , and a number of other keyboard shortcuts that you probably expect to have when working in a shell. Ruby ships with support for working with readline (or libedit).