0

I have a requirement, Simplecov should print this line

Coverage report generated ...

only if the test suite is green.

Is this possible?

Here's my initializer

SimpleCov.start do
  add_filter "/test/"
  coverage_dir "/tmp/coverage/"
end
american-ninja-warrior
  • 7,397
  • 11
  • 46
  • 80

1 Answers1

0

There is a at_exit hook in SimpleCov where you can skip the message

SimpleCov.at_exit do
  SimpleCov.result.format! if all_test_passed
end

but could not find a workaround for 'all_test_passed'. Did not find a way to get summary so that i can check if all tests passed.

Sanjay Sharma
  • 232
  • 1
  • 9