Module: CemAcpt::TestRunner::LogFormatter
- Defined in:
- lib/cem_acpt/test_runner/log_formatter.rb,
lib/cem_acpt/test_runner/log_formatter/base.rb,
lib/cem_acpt/test_runner/log_formatter/bolt_error_formatter.rb,
lib/cem_acpt/test_runner/log_formatter/goss_action_response.rb,
lib/cem_acpt/test_runner/log_formatter/goss_error_formatter.rb,
lib/cem_acpt/test_runner/log_formatter/bolt_output_formatter.rb,
lib/cem_acpt/test_runner/log_formatter/standard_error_formatter.rb,
lib/cem_acpt/test_runner/log_formatter/bolt_summary_results_formatter.rb
Overview
Holds classes for formatting test runner results
Defined Under Namespace
Classes: Base, BoltErrorFormatter, BoltOutputFormatter, BoltSummaryResultsFormatter, GossActionResponse, GossErrorFormatter, StandardErrorFormatter
Class Method Summary collapse
Class Method Details
.new_formatter(result, *args, **_kwargs) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/cem_acpt/test_runner/log_formatter.rb', line 13 def self.new_formatter(result, *args, **_kwargs) case result when CemAcpt::Goss::Api::ActionResponse if result.error? GossErrorFormatter.new(result) else GossActionResponse.new(*args, subject: result) end when CemAcpt::Bolt::SummaryResults BoltSummaryResultsFormatter.new(*args, subject: result) when StandardError StandardErrorFormatter.new(result) else raise ArgumentError, "result must be a CemAcpt::Goss::Api::ActionResponse, CemAcpt::Bolt::SummaryResults, or StandardError, got #{result.class}" end end |