Class: Riot::VerboseStoryReporter

Inherits:
StoryReporter show all
Defined in:
lib/riot/reporter/story.rb

Overview

Same as StoryReporter except that backtraces are printed for assertions with errors

Instance Attribute Summary

Attributes inherited from Reporter

#current_context, #errors, #failures, #passes

Instance Method Summary collapse

Methods inherited from StoryReporter

#describe_context, #fail, #pass

Methods inherited from IOReporter

#filter_backtrace, #format_error, #green, #initialize, #line_info, #plain?, #print, #puts, #red, #results, #with_color, #yellow

Methods inherited from Reporter

#describe_context, #fail, #initialize, #new, #pass, #report, #results, #success?, #summarize

Constructor Details

This class inherits a constructor from Riot::IOReporter

Instance Method Details

#error(description, e) ⇒ Object

Prints the description of the assertion and the exception backtrace. Prints in red if possible.

Parameters:

  • description (String)

    the description of the assertion

  • ] (Array<Symbol, Exception])

    result the exception from the assertion



46
47
48
49
# File 'lib/riot/reporter/story.rb', line 46

def error(description, e)
  super
  puts red(format_error(e))
end