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
11
# File 'lib/webspicy/tester/reporter/exceptions.rb', line 7

def initialize(*args, &bl)
  super
  @spec_file_errors = []
  @failed_results = []
end

Instance Attribute Details

#failed_resultsObject (readonly)

Returns the value of attribute failed_results.



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

def failed_results
  @failed_results
end

#spec_file_errorsObject (readonly)

Returns the value of attribute spec_file_errors.



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

def spec_file_errors
  @spec_file_errors
end

Instance Method Details

#reportObject



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

def report
  report_spec_file_errors
  report_failed_results
end

#spec_file_error(e) ⇒ Object



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

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

#test_case_doneObject



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

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