On Mar 3, 2007, at 8:59 PM, Eric Wilhelm wrote:
Do you comment out the tests => foo and uncomment the no_plan line
whenever you edit tests, or do you use a ternary and the r0/r1 vim
idiom? Or do you just delete the 'tests' option and type no_plan
longhand?
I never use no_plan, except in the rare cases when a test can't
reasonably know how much data it will be processing, as in a test of
an arbitrary number of links on a web page.
That means I don't use no_plan when editing tests.
When I add a test, I go and add the tests, keeping a mental note of
how many I've added, and then I go to the top of the file, and
increment the number. I've added three tests? I increment the
number by three.
Sometimes I make a mistake. I'll add four tests but only add three
to the count. I run prove, and oh no, the total is wrong. I svn
diff to look to see that yes, I've actually added four, and I update
the count by one more. I run prove again, and all is well. Commit.
Repeat.
It's really not that tough, and I don't mind the iteration. I think
as programmers we get far too hung up on the idea of doing everything
perfectly once.
--
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance