Class: Webspicy::Tester::Reporter::Exceptions

Inherits:
Webspicy::Tester::Reporter show all
Includes:
Documentation::Helpers
Defined in:
lib/webspicy/tester/reporter/exceptions.rb

Constant Summary

Constants included from Documentation::Helpers

Documentation::Helpers::INDENT

Constants inherited from Webspicy::Tester::Reporter

ErrorCount, HOOKS

Instance Attribute Summary collapse

Attributes inherited from Webspicy::Tester::Reporter

#io, #tester

Instance Method Summary collapse

Methods included from Documentation::Helpers

#check_error_line, #check_failure_line, #check_success_line, #service_line, #spec_file_error_line, #spec_file_line

Methods inherited from Webspicy::Tester::Reporter

#find, #init

Methods included from Support::Colorize

colorize, colorize_error, colorize_highlight, colorize_section, colorize_success

Constructor Details

#initialize(*args, &bl) ⇒ Exceptions

Returns a new instance of Exceptions.



7
8
9
10
# File 'lib/webspicy/tester/reporter/exceptions.rb', line 7

def initialize(*args, &bl)
  super
  clear
end

Instance Attribute Details

#failed_resultsObject (readonly)

Returns the value of attribute failed_results.



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

def failed_results
  @failed_results
end

#spec_file_errorsObject (readonly)

Returns the value of attribute spec_file_errors.



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

def spec_file_errors
  @spec_file_errors
end

Instance Method Details

#clearObject



26
27
28
29
# File 'lib/webspicy/tester/reporter/exceptions.rb', line 26

def clear
  @spec_file_errors = []
  @failed_results = []
end

#reportObject



21
22
23
24
# File 'lib/webspicy/tester/reporter/exceptions.rb', line 21

def report
  report_spec_file_errors
  report_failed_results
end

#spec_file_error(e) ⇒ Object



13
14
15
# File 'lib/webspicy/tester/reporter/exceptions.rb', line 13

def spec_file_error(e)
  @spec_file_errors << spec_file_error_line(spec_file, e)
end

#test_case_doneObject



17
18
19
# File 'lib/webspicy/tester/reporter/exceptions.rb', line 17

def test_case_done
  @failed_results << result unless result.success?
end