0

Anyone know a way to get simplecov code coverage from my delayed_job jobs? I'm using minitest and using Delayed::Worker.new.work_off to cause the job to run but the coverage stubbornly remains at zero.

Paul D Smith
  • 639
  • 5
  • 16
  • try to use `group` [DOCs](https://github.com/colszowka/simplecov#groups) – Oleh Sobchuk Oct 30 '16 at 17:07
  • Sorry, I may be being dumb but how does that help? `simplecov` does 'see' the files that contain my `delayed-job` jobs, files but it reports them as 0% covered. I've got logging in these job files and the logging happens so clearly the jobs are being run. Are you perhaps implying that these jobs are somehow being filtered out by DOCs somewhere? – Paul D Smith Nov 01 '16 at 08:45
  • I guess this files just filtered – Oleh Sobchuk Nov 01 '16 at 09:36
  • Oh the embarrassment. I've been happily running the integration test that hits the 'uncovered' code, but the test filename does not end in _test. This means that minitest does not run this one test, which is why I'm not seeing any code coverage for it. – Paul D Smith Nov 02 '16 at 19:20
  • yep, simplecov counts only `_spec.rb` files – Oleh Sobchuk Nov 02 '16 at 20:17

0 Answers0