Class: CemAcpt::TestRunner::LogFormatter::GossErrorFormatter

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

Constant Summary

Constants inherited from Base

Base::INDENT

Instance Attribute Summary

Attributes inherited from Base

#subject

Instance Method Summary collapse

Methods inherited from Base

#initialize, #inspect, #to_s

Constructor Details

This class inherits a constructor from CemAcpt::TestRunner::LogFormatter::Base

Instance Method Details

#host_name(response = nil) ⇒ Object



22
23
24
25
# File 'lib/cem_acpt/test_runner/log_formatter/goss_error_formatter.rb', line 22

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

#results(response = nil) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/cem_acpt/test_runner/log_formatter/goss_error_formatter.rb', line 14

def results(response = nil)
  super(response)
  result_strings = log_subject.results.reject { |r| r.success? || r.skipped? }.map do |r|
    r.summary_line_compact
  end
  [log_subject.summary, result_strings.join("\n")]
end

#summary(subject = nil) ⇒ Object



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

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

#test_name(response = nil) ⇒ Object



27
28
29
30
# File 'lib/cem_acpt/test_runner/log_formatter/goss_error_formatter.rb', line 27

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