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



837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 837

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



822
823
824
825
826
827
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 822

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



829
830
831
832
833
834
835
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 829

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