diff --git a/CHANGELOG.md b/CHANGELOG.md index 01ffb5b..bcbba08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.1 + +* Prevent raising `ZeroDivisionError` + ## 0.2.0 * Add support for Rails 5 diff --git a/lib/minitest/test_profile/reporter.rb b/lib/minitest/test_profile/reporter.rb index a779f92..e2dd3fa 100644 --- a/lib/minitest/test_profile/reporter.rb +++ b/lib/minitest/test_profile/reporter.rb @@ -43,6 +43,7 @@ def slow_tests_total_time end def ratio + return 0.0 if @calculated_total_time == 0 (slow_tests_total_time / @calculated_total_time) * 100 end