I know this is probably a meaningless metric, but I''m new to TDD and would like to know what to expect in terms of lines of code of tests to lines of code in a "typical" rails app. It seems like it could be as much as 5:1 or more. Perhaps its more like number of test methods : lines of code is closer to 1:1 ?
I think I run about 2:1 average, ranging from 8:1 for views to 1:4 for difficult business logic in the models. Jim On May 23, 2007, at 9:52 AM, Jonathan Linowes wrote:> I know this is probably a meaningless metric, but I''m new to TDD and > would like to know what to expect in terms of lines of code of tests > to lines of code in a "typical" rails app. It seems like it could be > as much as 5:1 or more. Perhaps its more like number of test > methods : lines of code is closer to 1:1 ? > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
On 5/23/07, Jonathan Linowes <jonathan at parkerhill.com> wrote:> I know this is probably a meaningless metric, but I''m new to TDD and > would like to know what to expect in terms of lines of code of tests > to lines of code in a "typical" rails app. It seems like it could be > as much as 5:1 or more. Perhaps its more like number of test > methods : lines of code is closer to 1:1 ?LOC ratios are meaningless. I''d rather strive for 90% code coverage (rake spec:rcov). This doesn''t tell you that your specs are ok, but it tells you when they''re not. Also, using --heckle with RSpec can help you assert spec goodness. Aslak> _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >