Class: Riot::StoryReporter

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

Direct Known Subclasses

VerboseStoryReporter

Instance Attribute Summary

Attributes inherited from Reporter

#current_context, #errors, #failures, #passes

Instance Method Summary collapse

Methods inherited from IOReporter

#format_error, #initialize, #print, #puts, #results

Methods inherited from Reporter

#initialize, #new, #report, #success?, #summarize

Constructor Details

This class inherits a constructor from Riot::IOReporter

Instance Method Details

#describe_context(context) ⇒ Object



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

def describe_context(context)
  super
  puts context.description
end

#error(description, e) ⇒ Object



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

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

#fail(description, message) ⇒ Object



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

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

#pass(description, message) ⇒ Object



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

def pass(description, message) puts "  + " + green("#{description} #{message}".strip); end