Skip to content

Commit

Permalink
Print failures immediately instead of at the end of the run
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary committed Dec 10, 2008
1 parent d47c6d5 commit 0fc9461
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
1 change: 0 additions & 1 deletion TODO.txt
Expand Up @@ -4,4 +4,3 @@ Move DB setup and teardown to separate Ruby processes
Detect runner crashes and send the feature file to another runner
Figure out how to work with different mysql login configurations
Detect and handle RSync failure
Print partial test results when killed with CTRL+C
22 changes: 10 additions & 12 deletions lib/testjour/cucumber_extensions/queueing_executor.rb
Expand Up @@ -41,7 +41,6 @@ def wait_for_results
progress_bar.finish

print_summary
print_errors
end

def failed?
Expand All @@ -58,13 +57,23 @@ def log_result(uri, dot, message, backtrace)
@passed += 1
when "F"
@errors << [message, backtrace]

erase_current_line
print Testjour::Colorer.failed("#{@errors.size}) ")
puts Testjour::Colorer.failed(message)
puts backtrace
puts
when "P"
@pending += 1
when "_"
@skipped += 1
end
end

def erase_current_line
print "\e[K"
end

def print_summary
puts
puts
Expand All @@ -75,17 +84,6 @@ def print_summary
puts
end

def print_errors
@errors.each_with_index do |error, i|
message, backtrace = error

puts
puts Colorer.failed("#{i+1})")
puts Colorer.failed(message)
puts Colorer.failed(backtrace)
end
end

def visit_feature(feature)
super
@queue_server.write_work(feature.file)
Expand Down

0 comments on commit 0fc9461

Please sign in to comment.