From: Jamis Buck Date: 2004-08-24T01:36:54+09:00 Subject: Re: How to check syntax Graham Nicholls (spam_filtered) wrote: > Jamis Buck wrote: > > >>Andreas Schwarz wrote: >> >>>Graham Nicholls wrote: >>> >> >>Admittedly, if you've never done unit testing before, it is something of >>a learning curve to (1) figure out the API (though it is wonderfully >>clean and straightforward compared to JUnit), and (2) learn how to write >>code that can be unit tested. However, TAKE THE TIME TO LEARN HOW TO DO >>IT! It will repay you many (many!) times over in time saved debugging >>difficult problems. >> > > Where do I start, then (sigh!). Is this something I need simply to write > scripts to do - a la makefiles? - in fact ISTM that a make file would be > ideal - or am I missing something? > Ta > Graham To start, I'd check out Nathaniel Talbott's documentation on test/unit: http://testunit.talbott.ws/doc/index.html About halfway down the page (under Usage) it starts talking about how to use test/unit. Beyond that, I don't know of any resources for learning unit testing, although you should look at other libraries to see how they do their testing. ActiveRecord is a good one; I've also used unit tests in my SQLite/Ruby module. In a few days (hopefully) Copland 0.5.0 will be released and it has a pretty comprehensive unit testing suite as well. Anyone know of any good resources for learning how to do unit testing in Ruby? - Jamis -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis "I use octal until I get to 8, and then I switch to decimal."