Class: CIAT::Feedback::FeedbackCounter

Inherits:
Object
  • Object
show all
Defined in:
lib/ciat/feedback/feedback_counter.rb

Overview

This feedback class sends some simple messages to the screen about the progress of a CIAT::Suite run.

Instance Method Summary collapse

Constructor Details

#initializeFeedbackCounter

Returns a new instance of FeedbackCounter.



6
7
8
9
# File 'lib/ciat/feedback/feedback_counter.rb', line 6

def initialize
  @error_count = 0
  @failure_count = 0
end

Instance Method Details

#error_countObject



11
12
13
# File 'lib/ciat/feedback/feedback_counter.rb', line 11

def error_count
  @error_count
end

#failure_countObject



15
16
17
# File 'lib/ciat/feedback/feedback_counter.rb', line 15

def failure_count
  @failure_count
end

#increment_error_countObject



19
20
21
# File 'lib/ciat/feedback/feedback_counter.rb', line 19

def increment_error_count
  @error_count += 1
end

#increment_failure_countObject



23
24
25
# File 'lib/ciat/feedback/feedback_counter.rb', line 23

def increment_failure_count
  @failure_count += 1
end

#post_tests(suite) ⇒ Object



31
32
33
# File 'lib/ciat/feedback/feedback_counter.rb', line 31

def post_tests(suite)
  nil
end

#pre_tests(suite) ⇒ Object



27
28
29
# File 'lib/ciat/feedback/feedback_counter.rb', line 27

def pre_tests(suite)
  nil
end

#report_subresult(subresult) ⇒ Object



35
36
37
38
39
40
41
42
# File 'lib/ciat/feedback/feedback_counter.rb', line 35

def report_subresult(subresult)
  case subresult.light.setting
  when :red
    increment_failure_count
  when :yellow
    increment_error_count
  end
end