I’m writing tests (using minitest) for a Rails app, using Guard to monitor my test files and then Simplecov to show me my current local coverage (coverage/index.html).
rake test runs my entire test suite. My question/problem is that I can’t get an updated coverage without running rake test every single time I make a change to my test files. Coverage will drop to 0.0% until I remove /coverage, run rake test, and then open/refresh coverage/index.html. Is there no way to avoid having to do this process every time I want to review my coverage?
Can provide my setup if it helps?
[quote=“timrobertsonworks, post:1, topic:5721”]
My question/problem is that I can’t get an updated coverage without running rake test every single time I make a change to my test files.[/quote]
You’ll need to run your tests to update the coverage report. SimpleCov runs as part of your test suite.
My experience with SimpleCov and Guard was that any time the tests were run the files in /coverage would be updated. I never had to remove the directory to update the coverage report.