Class: XSpec::Notifier::Character
- Inherits:
-
Object
- Object
- XSpec::Notifier::Character
- Includes:
- Composable
- 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
- #evaluate_start(*_) ⇒ Object
-
#initialize(out = $stdout) ⇒ Character
constructor
A new instance of Character.
- #run_finish ⇒ Object
- #run_start ⇒ Object
Methods included from Composable
Constructor Details
#initialize(out = $stdout) ⇒ Character
Returns a new instance of Character.
49 50 51 |
# File 'lib/xspec/notifiers.rb', line 49 def initialize(out = $stdout) @out = out end |
Instance Method Details
#evaluate_finish(result) ⇒ Object
57 58 59 60 |
# File 'lib/xspec/notifiers.rb', line 57 def evaluate_finish(result) @out.print label_for_failure(result.errors[0]) @failed ||= result.errors.any? end |
#evaluate_start(*_) ⇒ Object
55 |
# File 'lib/xspec/notifiers.rb', line 55 def evaluate_start(*_); end |
#run_finish ⇒ Object
62 63 64 65 |
# File 'lib/xspec/notifiers.rb', line 62 def run_finish @out.puts !@failed end |
#run_start ⇒ Object
53 |
# File 'lib/xspec/notifiers.rb', line 53 def run_start; end |