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, line, file) ⇒ Object
- #pass(description, message) ⇒ Object
Methods inherited from IOReporter
#format_error, #initialize, #line_info, #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
79 80 81 82 |
# File 'lib/riot/reporter.rb', line 79 def describe_context(context) super puts context.detailed_description end |
#error(description, e) ⇒ Object
89 |
# File 'lib/riot/reporter.rb', line 89 def error(description, e) puts " ! " + red("#{description}: #{e.}"); end |
#fail(description, message, line, file) ⇒ Object
85 86 87 |
# File 'lib/riot/reporter.rb', line 85 def fail(description, , line, file) puts " - " + yellow("#{description}: #{} #{line_info(line, file)}".strip) end |
#pass(description, message) ⇒ Object
83 |
# File 'lib/riot/reporter.rb', line 83 def pass(description, ) puts " + " + green("#{description} #{}".strip); end |