Class: XSpec::Notifier::Character

Inherits:
Object
  • Object
show all
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

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_finishObject



62
63
64
65
# File 'lib/xspec/notifiers.rb', line 62

def run_finish
  @out.puts
  !@failed
end

#run_startObject



53
# File 'lib/xspec/notifiers.rb', line 53

def run_start; end