# File lib/turn/components/case.rb, line 81 def count_errors sum = 0; tests.each{ |t| sum += 1 if t.error? }; sum end
# File lib/turn/components/case.rb, line 77 def count_failures sum = 0; tests.each{ |t| sum += 1 if t.fail? }; sum end
# File lib/turn/components/case.rb, line 85 def count_passes sum = 0; tests.each{ |t| sum += 1 if t.pass? }; sum end
# File lib/turn/components/case.rb, line 89 def count_skips # Why not use tests.select(&:skip?).size ? sum = 0; tests.each{ |t| sum += 1 if t.skip? }; sum end
# File lib/turn/components/case.rb, line 71 def count_tests tests.size end
# File lib/turn/components/case.rb, line 95 def counts return count_tests, count_assertions, count_failures, count_errors, count_skips end
# File lib/turn/components/case.rb, line 103 def each(&block) tests.each(&block) end
Were there any errors?
# File lib/turn/components/case.rb, line 57 def error? count_errors != 0 end
Were there any failures?
# File lib/turn/components/case.rb, line 62 def fail? count_failures != 0 end
# File lib/turn/components/case.rb, line 99 def message tests.collect{ |t| t.message }.join("\n") end
# File lib/turn/components/case.rb, line 47 def new_test(name) c = TestMethod.new(name) @tests << c c end
Generated with the Darkfish Rdoc Generator 2.