metricfu / metric_fu

A fist full of code metrics
http://metricfu.github.com/metric_fu
MIT License
627 stars 96 forks source link

Simplecov as documented throws exception #235

Closed nielsm closed 9 years ago

nielsm commented 10 years ago

In a simple ruby app, adding to spec_helper as per read me and then running the tests results in Formatter SimpleCov::Formatter::MetricFu failed with NoMethodError: undefined method mf_log' for #<MetricFu::RCovTestCoverageClient:0x007f9aa1eba990> (/usr/local/lib/ruby/gems/1.9.1/gems/metric_fu-4.11.1/lib/metric_fu/metrics/rcov/external_client.rb:11:inpost_results')

nielsm commented 10 years ago

It appears to be looking for something in the metric_fu project's spec_helper: def mf_log(msg); mf_debug(msg); end

bf4 commented 10 years ago

d'oh. try require 'metric_fu/logger`

nielsm commented 10 years ago

My workaround was adding def mf_log(msg); puts(msg); end in my spec_helper. I'll try the require as well.

bf4 commented 10 years ago

I apologize for missing that dependency. OTOH, thanks for trying it out. If your'e up for it, I need a PR to persist the simplecov report by date along with the metric_fu data.