diff --git a/lib/turn/components/case.rb b/lib/turn/components/case.rb index 9b18ca1..b609681 100644 --- a/lib/turn/components/case.rb +++ b/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