Class: Cucumber::Formatter::LegacyApi::Adapter::TableRowPrinter

Inherits:
TableRowPrinterBase 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



849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 849

def after
  return if @done
  @child.after if @child
  node.values.each do |value|
    formatter.before_table_cell(value)
    formatter.table_cell_value(value, @status || :skipped)
    formatter.after_table_cell(value)
  end
  @after_step_hook_result.send_output_to(formatter) if @after_step_hook_result
  after_hook_results.send_output_to(formatter)
  formatter.after_table_row(legacy_table_row)
  @after_step_hook_result.describe_exception_to(formatter) if @after_step_hook_result
  after_hook_results.describe_exception_to(formatter)
  @done = true
  self
end

#beforeObject



834
835
836
837
838
839
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 834

def before
  before_hook_results.accept(formatter)
  Ast::Comments.new(node.comments).accept(formatter)
  formatter.before_table_row(node)
  self
end

#step_invocation(step_invocation, source) ⇒ Object



841
842
843
844
845
846
847
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 841

def step_invocation(step_invocation, source)
  result = source.step_result
  step_invocation.messages.each { |message| formatter.puts(message) }
  step_invocation.embeddings.each { |embedding| embedding.send_to_formatter(formatter) }
  @failed_step = step_invocation if result.status == :failed
  @status = step_invocation.status unless already_failed?
end