PragDave has a nice article on test driven development using Eunit. Eunit is very lightweight, easy to use, and useful. Check it out.