Class: Riot::StoryReporter

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

Direct Known Subclasses

VerboseReporter

Instance Attribute Summary

Attributes inherited from Reporter

#errors, #failures, #passes

Instance Method Summary collapse

Methods inherited from IOReporter

#initialize, #results, #say

Methods inherited from Reporter

#initialize, #report, #summarize

Constructor Details

This class inherits a constructor from Riot::IOReporter

Instance Method Details

#describe_context(description) ⇒ Object



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

def describe_context(description) say description; end

#error(description, e) ⇒ Object



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

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

#fail(description, message) ⇒ Object



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

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

#pass(description) ⇒ Object



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

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