Rails and rcov...
There is an interesting thread going on the rails-core mailing list about testing coverage and documentation.
I learned about rcov which provides testing coverage metrics for Ruby applications. Here are links to the results so farTook this content down due to it being stale:
As an example of differences between running rake test versus rcov test*.rb, in Activerecord there is a test case named aaa_create_tables_test that runs fine with rake, but with rcov there is a load error because aaa_create_tables_test requires abstract_unit.rb which simple test/*.rb has loaded yet because aaa_create_tables_test comes before abstract_unit. I have gotten farther with loading abstract_unit.rb explicitly rcov -x actionpack,activesupport test/abstract_unit.rb test/*.rb but it would be better if I could figure out how to wrap rake inside of rcov...
Update: I removed the old test coverage values and the links to the results.
ActionMailer
rcov -x activerecord,activesupport,actionpack test/*.rbActionPack(top level only)
rcov -x activerecord,activesupport,actionmailer test/*.rbActionWebService
rcov -x activerecord,activesupport,actionpack,actionmailer test/*.rb
As an example of differences between running rake test versus rcov test*.rb, in Activerecord there is a test case named aaa_create_tables_test that runs fine with rake, but with rcov there is a load error because aaa_create_tables_test requires abstract_unit.rb which simple test/*.rb has loaded yet because aaa_create_tables_test comes before abstract_unit. I have gotten farther with loading abstract_unit.rb explicitly rcov -x actionpack,activesupport test/abstract_unit.rb test/*.rb but it would be better if I could figure out how to wrap rake inside of rcov...
Update: I removed the old test coverage values and the links to the results.