Class: Riot::StoryReporter
- Inherits:
-
IOReporter
- Object
- Reporter
- IOReporter
- Riot::StoryReporter
- Defined in:
- lib/riot/reporter.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Reporter
#current_context, #errors, #failures, #passes
Instance Method Summary collapse
- #describe_context(context) ⇒ Object
- #error(description, e) ⇒ Object
- #fail(description, message) ⇒ Object
- #pass(description, message) ⇒ Object
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.}"); end |
#fail(description, message) ⇒ Object
79 |
# File 'lib/riot/reporter.rb', line 79 def fail(description, ) puts " - " + yellow("#{description}: #{}"); end |
#pass(description, message) ⇒ Object
78 |
# File 'lib/riot/reporter.rb', line 78 def pass(description, ) puts " + " + green("#{description} #{}".strip); end |