Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SimpleCov: Not run every time, just with rake task

Is there a possibility to run simplecov coverage-tool for rails just over an rake task and not every time, when running the tests?

like image 344
Matthias Avatar asked Mar 03 '11 18:03

Matthias


1 Answers

You can sort of work around this using an environment variable:

SimpleCov.start if ENV["COVERAGE"]

And then, running rake test / rspec / cucumber with

$ COVERAGE=true rake test
like image 75
TheDeadSerious Avatar answered Oct 22 '22 19:10

TheDeadSerious