Thanks for the info Pat.  To be honest that is what I wanted to hear. 
There seems to be such an importance set on the lines of code to lines 
of testing ratio that it seems a person is violating some rule if  the 
ratio isn't high enough to the right.

The thing that bugged me when writing out the tests for controllers is 
that there really was no logic in the controller code.  It looked just 
like 90% of the controllers I have created, so it made no sense to why I 
had (or so I thought) to write so many tests.

It seems that most tests are written in the fear that someone will later 
make a change and not realize what they have done unless a test now 
fails.  For example in model testing I am sure most people create a 
tests for the relations to other models, but for what reason.  You write 
the test to whether the relation exists, it fails, you make the 
relation, it passes.  Why not just write the relation and be done with 
it, because there is paranoia that someone will later decide to delete 
the relation...I guess.  The same is also true for testing if there the 
various validators exist for the various columns.

As I mentioned before, I am totally in favour of writing tests where 
there is some fear that it may not work as I expected, for that tests 
rock.  It is the tests that acts as a double check that I don't care for 
so much.  Maybe the book below that amazon displays on main page every 
time I visit the site should be something I check out soon.

Thanks again Pat.

http://amazon.ca/gp/product/0321146530/ref=s9_flash_asin_image_1_wish_c2?ie=UTF8&coliid=I2GQJNWRWB147V&colid=7OMS5OB238SP&pf_rd_m=A3DWYIK6Y9EEQB&pf_rd_s=center-2&pf_rd_r=1Z4Z31VY2YQ6P9PHQSK6&pf_rd_t=101&pf_rd_p=289767901&pf_rd_i=915398
-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to