Class: XSpec::Notifier::Character
- Inherits:
-
Object
- Object
- XSpec::Notifier::Character
- Includes:
- Composable, EmptyFormatter
- Defined in:
- lib/xspec/notifiers.rb
Overview
Outputs a single character for each executed unit of work representing the result.
Instance Method Summary collapse
- #evaluate_finish(result) ⇒ Object
-
#initialize(out = $stdout) ⇒ Character
constructor
A new instance of Character.
- #run_finish ⇒ Object
Methods included from Composable
Methods included from EmptyFormatter
Constructor Details
#initialize(out = $stdout) ⇒ Character
Returns a new instance of Character.
61 62 63 |
# File 'lib/xspec/notifiers.rb', line 61 def initialize(out = $stdout) @out = out end |
Instance Method Details
#evaluate_finish(result) ⇒ Object
65 66 67 68 |
# File 'lib/xspec/notifiers.rb', line 65 def evaluate_finish(result) @out.print label_for_failure(result.errors[0]) @failed ||= result.errors.any? end |
#run_finish ⇒ Object
70 71 72 73 |
# File 'lib/xspec/notifiers.rb', line 70 def run_finish @out.puts !@failed end |