ruby on rails - Disabling code coverage for guard spec runs -


for variety of reasons, find running code coverage every time files reload guard quite burden. however, there doesn't seem way conditionally prevent simplecov starting spec helper.

is there way disable simplecov when run guard, not when run using rake spec?

i found solution:

  1. add environment variable in guardfile:

    guard :rspec, env: { 'no_coverage' => 'true' }

  2. check spec helper:

    simplecov.start :rails unless env["no_coverage"]


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -