Class: Riot::StoryReporter

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

Direct Known Subclasses

VerboseStoryReporter

Instance Attribute Summary

Attributes inherited from IOReporter

#writer

Attributes inherited from Reporter

#current_context, #errors, #failures, #passes

Instance Method Summary collapse

Methods inherited from IOReporter

#format_error, #initialize, #results, #say

Methods inherited from Reporter

#initialize, #new, #report, #summarize

Constructor Details

This class inherits a constructor from Riot::IOReporter

Instance Method Details

#describe_context(context) ⇒ Object



72
73
74
75
# File 'lib/riot/reporter.rb', line 72

def describe_context(context)
  super
  say context.description
end

#error(description, e) ⇒ Object



78
# File 'lib/riot/reporter.rb', line 78

def error(description, e) say "  ! " + red("#{description}: #{e.message}"); end

#fail(description, message) ⇒ Object



77
# File 'lib/riot/reporter.rb', line 77

def fail(description, message) say "  - " + yellow("#{description}: #{message}"); end

#pass(description) ⇒ Object



76
# File 'lib/riot/reporter.rb', line 76

def pass(description) say "  + " + green(description); end