Re: Validations issue

Marnen Laibow-Koser
Wed, 05 Jan 2011 18:07:13 -0000

Finne Jager wrote in post #972574:
[...]
>> Do your tests that check that the validations on CommandOfficer work
>> correctly pass ok?
>>
>> Colin
>
> I haven''t learned much about tests yet and haven''t used
them so far.

...and now you know why you must -- it''s hard to tell what
isn''t working
if you don''t have them.  Testing is not optional.

So...stop writing application code now.  Get RSpec and Cucumber, and
write a comprehensive test suite for your application.  Preferably, do
so before writing *one more line* of application code.  At a minimum,
write tests for the next thing you''re trying to implement -- before you
implement it.  Do all future development test-first -- that is, write
one failing test, watch it fail, and then do the simplest thing to make
it pass.  Refactor once the test passes -- if you have a comprehensive
test suite, you''ll know that the refactoring hasn''t broken
anything.

This is how reliable software is made.  Anything less is just hacking.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org