Class: Webspicy::Tester::Reporter::ErrorCount

Inherits:
Webspicy::Tester::Reporter show all
Defined in:
lib/webspicy/tester/reporter/error_count.rb

Constant Summary

Constants inherited from Webspicy::Tester::Reporter

HOOKS

Instance Attribute Summary

Attributes inherited from Webspicy::Tester::Reporter

#io, #tester

Instance Method Summary collapse

Methods inherited from Webspicy::Tester::Reporter

#init

Methods included from Support::Colorize

colorize, colorize_error, colorize_highlight, colorize_success

Constructor Details

#initialize(*args, &bl) ⇒ ErrorCount

Returns a new instance of ErrorCount.



6
7
8
9
# File 'lib/webspicy/tester/reporter/error_count.rb', line 6

def initialize(*args, &bl)
  super
  @error_count = 0
end

Instance Method Details

#on_error(*args, &bl) ⇒ Object Also known as: spec_file_error, check_failure, check_error



11
12
13
# File 'lib/webspicy/tester/reporter/error_count.rb', line 11

def on_error(*args, &bl)
  @error_count += 1
end

#reportObject



18
19
20
# File 'lib/webspicy/tester/reporter/error_count.rb', line 18

def report
  @error_count
end