Class: Cucumber::Formatter::LegacyApi::Adapter::ExpandTableRowPrinter

Inherits:
TableRowPrinterBase
  • Object
show all
Defined in:
lib/cucumber/formatter/legacy_api/adapter.rb

Instance Method Summary collapse

Methods inherited from TableRowPrinterBase

#after_step_hook, #after_test_case

Methods included from PrintsAfterHooks

#after_hook, #after_hook_results

Instance Method Details

#afterObject


892
893
894
895
896
897
898
899
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 892

def after
  return if @done
  @child.after if @child
  @after_step_hook_result.accept(formatter) if @after_step_hook_result
  after_hook_results.accept(formatter)
  @done = true
  self
end

#beforeObject


874
875
876
877
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 874

def before
  before_hook_results.accept(formatter)
  self
end

#step_invocation(step_invocation, source) ⇒ Object


879
880
881
882
883
884
885
886
887
888
889
890
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 879

def step_invocation(step_invocation, source)
  result = source.step_result
  @table_row ||= legacy_table_row
  step_invocation.indent.record_width_of(@table_row)
  if !@scenario_name_printed
    print_scenario_name(step_invocation, @table_row)
    @scenario_name_printed = true
  end
  step_invocation.accept(formatter)
  @failed_step = step_invocation if result.status == :failed
  @status = step_invocation.status unless @status == :failed
end