Class: QAT::Formatter::Console
- Inherits:
-
Object
- Object
- QAT::Formatter::Console
- Includes:
- Cucumber::Formatter, Cucumber::Formatter::Io, Cucumber::Gherkin::Formatter::Escaping, FileUtils, Helper, Loggable, Logger
- Defined in:
- lib/qat/formatter/console.rb
Overview
Formatter to print Feature, Scenario and Step information on the fly. Will use STDOUT by default or a specified logger configuration channel.
Instance Method Summary collapse
-
#initialize(config) ⇒ Console
constructor
A new instance of Console.
Methods included from Helper
#assign_print_feature, #on_test_case_finished, #on_test_case_started, #on_test_run_finished, #on_test_step_finished, #on_test_step_started, #print_assign_step, #print_scenario_results, #print_scenario_start
Methods included from UtilityFuction
#background, #calculate_row_number, #create_feature_hash, #features?, #get_example_values, #get_lines_from_scenario
Methods included from Builder
#add_values_to_examples, #build, #create_id_from_scenario_source, #feature, #get_scenario_tags, #scenario
Methods included from Loggable
#begin_test_step, #check_outputter, #ensure_outputter
Methods included from Loggable::Mdc
#mdc_add_status_failed!, #mdc_add_step!, #mdc_after_feature!, #mdc_before_feature!, #mdc_before_scenario!, #mdc_remove_step!, #mdc_reset_scenario!
Constructor Details
#initialize(config) ⇒ Console
Returns a new instance of Console.
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/qat/formatter/console.rb', line 26 def initialize(config) @config = config @io = ensure_io(config.out_stream, config.error_stream) @ast_lookup = ::Cucumber::Formatter::AstLookup.new(config) @feature_hashes = [] config.on_event :test_case_started, &method(:on_test_case_started) config.on_event :test_case_finished, &method(:on_test_case_finished) config.on_event :test_step_started, &method(:on_test_step_started) config.on_event :test_step_finished, &method(:on_test_step_finished) config.on_event :test_run_finished, &method(:on_test_run_finished) end |