Skip to content

Commit

Permalink
Also display exceptions that do not cause a specific step to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
mthorn committed Feb 6, 2014
1 parent 9b8aab0 commit c61741a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions lib/cucumber/formatter/fuubar.rb
Expand Up @@ -40,15 +40,6 @@ def after_background(background)
def after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line)
return if @in_background || status == :skipped
@state = :red if status == :failed
if exception and [:failed, :undefined].include? status
@io.print "\e[K" if colors_enabled?
@issues_count += 1
@io.puts
@io.puts "#{@issues_count})"
print_exception(exception, status, 2)
@io.puts
@io.flush
end
progress(status)
end

Expand All @@ -72,6 +63,16 @@ def after_table_row(table_row)
end
end

def exception(exception, status)
@io.print "\e[K" if colors_enabled?
@issues_count += 1
@io.puts
@io.puts "#{@issues_count})"
print_exception(exception, status, 2)
@io.puts
@io.flush
end

protected
def state
@state ||= :green
Expand Down

0 comments on commit c61741a

Please sign in to comment.