Permalink
Browse files

Merge pull request #7 from tmornini/master

Skips should not be counted as passes
  • Loading branch information...
2 parents 8f4e91c + ebc791b commit 3bc6a52e48531ec7645cc1436789bc94c6aea0e5 Tom Mornini committed Mar 22, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/turn/components/case.rb
@@ -65,7 +65,7 @@ def fail?
# Did all tests/assertion pass?
def pass?
- not(fail? or error?)
+ not(fail? or error? or skip?)
end
def count_tests
@@ -86,6 +86,10 @@ def count_passes
sum = 0; tests.each{ |t| sum += 1 if t.pass? }; sum
end
+ def skip?
+ count_skips > 0
+ end
+
def count_skips
# Why not use tests.select(&:skip?).size ?
sum = 0; tests.each{ |t| sum += 1 if t.skip? }; sum

0 comments on commit 3bc6a52

Please sign in to comment.