code_metrics
code_metrics copied to clipboard
Add default test directory descriptions to Statistics::TEST_TYPES.
"Test LOC" is always 0 unless you have manually configured test your test directories via CodeMetrics::StatsDirectories#add_test_directory, CodeMetrics::StatsDirectories#add_test_directories, etc.
Modify CodeMetrics::Statistics#initialize so that the default test directories are also added to the CodeMetrics::Statistics::TEST_TYPES array. This allows CodeMetrics::Statistics#calculate_tests to work in the default configuration case (eg., when using "metric_fu" without and custom "code_metrics" configuration changes).
Also, add a dummy controller test and adjust the expected results in the test_code_metrics_sanity to look for the correct, updated values for "Test LOC" and "Code to Test Ratio".
Well, ruby-2.0 works. The other versions are failing CI, but I don't think this is a new problem...
Looks good, thanks!
Sorry about the test failures. I haven't worked on this in a while (because there's not much to do), so I guess the deps have changed in a non-pessimistic way. I'll take a look at what Rails might have changed.
No worries. I only noticed it because "metric_fu" uses "code_metrics" for graphing, and I just ran it again on a new project and figured I might as well investigate this time.
@jimtreadway Would you like if I added you as a collaborator so you can help bring this completion? I've just very distracted with other things right now.