Class: CemAcpt::TestRunner::LogFormatter::BoltErrorFormatter

Inherits:
Base
  • Object
show all
Defined in:
lib/cem_acpt/test_runner/log_formatter/bolt_error_formatter.rb

Constant Summary

Constants inherited from Base

CemAcpt::TestRunner::LogFormatter::Base::INDENT

Instance Attribute Summary

Attributes inherited from Base

#subject

Instance Method Summary collapse

Methods inherited from Base

#inspect, #to_s

Constructor Details

#initialize(subject: nil) ⇒ BoltErrorFormatter

Returns a new instance of BoltErrorFormatter.



9
10
11
# File 'lib/cem_acpt/test_runner/log_formatter/bolt_error_formatter.rb', line 9

def initialize(subject: nil)
  super(subject)
end

Instance Method Details

#host_name(response = nil) ⇒ Object



25
26
27
28
# File 'lib/cem_acpt/test_runner/log_formatter/bolt_error_formatter.rb', line 25

def host_name(response = nil)
  super(response)
  "Error: #{log_subject.error.class.name}"
end

#results(response = nil) ⇒ Object



18
19
20
21
22
23
# File 'lib/cem_acpt/test_runner/log_formatter/bolt_error_formatter.rb', line 18

def results(response = nil)
  super(response)
  log_subject.results.map do |res|
    format_failed_result(res)
  end
end

#summary(response = nil) ⇒ Object



13
14
15
16
# File 'lib/cem_acpt/test_runner/log_formatter/bolt_error_formatter.rb', line 13

def summary(response = nil)
  super(response)
  "Error: #{log_subject.summary}"
end

#test_name(response = nil) ⇒ Object



30
31
32
33
# File 'lib/cem_acpt/test_runner/log_formatter/bolt_error_formatter.rb', line 30

def test_name(response = nil)
  super(response)
  "Error: #{log_subject.error.class.name}"
end