Class: CIAT::Feedback::StandardOutput
- Inherits:
-
Object
- Object
- CIAT::Feedback::StandardOutput
- Defined in:
- lib/ciat/feedback/standard_output.rb
Overview
This feedback class sends some simple messages to the screen about the progress of a CIAT::Suite run.
Constant Summary collapse
- LIGHT_OUTPUTS =
{ :green => ".", :red => "F", :yellow => "E", :unset => "-" }
Instance Method Summary collapse
-
#initialize(counter) ⇒ StandardOutput
constructor
A new instance of StandardOutput.
- #post_tests(suite) ⇒ Object
- #pre_tests(suite) ⇒ Object
- #report_subresult(processor) ⇒ Object
Constructor Details
#initialize(counter) ⇒ StandardOutput
8 9 10 |
# File 'lib/ciat/feedback/standard_output.rb', line 8 def initialize(counter) @counter = counter end |
Instance Method Details
#post_tests(suite) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/ciat/feedback/standard_output.rb', line 16 def post_tests(suite) print "\n" print "#{suite.size} tests executed" print ", #{@counter.failure_count} failures" if @counter.failure_count > 0 print ", #{@counter.error_count} errors" if @counter.error_count > 0 print ".\n" end |
#pre_tests(suite) ⇒ Object
12 13 14 |
# File 'lib/ciat/feedback/standard_output.rb', line 12 def pre_tests(suite) nil end |
#report_subresult(processor) ⇒ Object
24 25 26 |
# File 'lib/ciat/feedback/standard_output.rb', line 24 def report_subresult(processor) putc LIGHT_OUTPUTS[processor.light.setting] end |