Navigation Menu

Skip to content

Commit

Permalink
Fix invalid pass ratio computation on all tests are not checked tests…
Browse files Browse the repository at this point in the history
… case
  • Loading branch information
kou committed Aug 11, 2012
1 parent cc144fa commit a48d340
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/grntest/tester.rb
Expand Up @@ -492,10 +492,11 @@ def initialize
end

def pass_ratio
if n_tests.zero?
n_target_tests = n_tests - n_not_checked_tests
if n_target_tests.zero?
0
else
(n_passed_tests / (n_tests - n_not_checked_tests).to_f) * 100
(n_passed_tests / n_target_tests.to_f) * 100
end
end

Expand Down

0 comments on commit a48d340

Please sign in to comment.