Permalink
Browse files

Merge pull request #8 from tmornini/master

Skips now show yellow lights
  • Loading branch information...
Tom Mornini
Tom Mornini committed Mar 22, 2012
2 parents 3bc6a52 + 1556e96 commit 4ed8d83c925dfa7802278e331f77a9f29f79bec7
Showing with 9 additions and 8 deletions.
  1. +2 −3 lib/turn/components/suite.rb
  2. +7 −5 lib/turn/reporters/snuggs_reporter.rb
@@ -70,7 +70,7 @@ def count_skips
# Convenience methods --this is what is typcially wanted.
def counts
- return count_tests, count_assertions, count_failures, count_errors ,count_skips
+ return count_tests, count_assertions, count_failures, count_errors, count_skips
end
def each(&block)
@@ -87,8 +87,7 @@ def size=(number)
end
def passed?
- (count_failures == 0 && count_errors == 0)
+ (count_failures == 0 && count_errors == 0 && count_skips == 0)
end
end
-
end
@@ -84,7 +84,8 @@ def pass message=nil
end
def fail assertion
- io.puts " %s %s" % [ticktock, FAIL]
+ io.puts FAIL
+ io.puts
message = []
message << ANSI.bold { assertion.message.to_s }
@@ -104,7 +105,8 @@ def fail assertion
end
def error exception
- io.puts " %s %s" % [ticktock, ERROR]
+ io.puts ERROR
+ io.puts
message = []
message << ANSI.bold { exception.message }
@@ -118,7 +120,7 @@ def error exception
end
def skip(exception)
- io.puts " %s %s" % [ ticktock, ANSI.yellow { 'SKIP' } ]
+ io.puts ANSI.yellow { 'SKIP' }
message = exception.message
@@ -170,9 +172,9 @@ def finish_suite(suite)
bottom << " total: %d tests with %d assertions in %f seconds" % [total, assertions, (Time.new - @time)]
bottom << bar
- color = if passes == total
+ color = if ( failures + skips + errors ) == 0
:green
- elsif errors == 0
+ elsif ( failures + errors ) == 0
:yellow
else
:red

0 comments on commit 4ed8d83

Please sign in to comment.