Class: Cucumber::Formatter::LegacyApi::Adapter::ScenarioOutlinePrinter

Inherits:
Struct
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/cucumber/formatter/legacy_api/adapter.rb

Instance Method Summary collapse

Instance Method Details

#afterObject


629
630
631
632
633
634
635
636
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 629

def after
  @child.after if @child
  # TODO: the last step result might not accurately reflect the
  # overall scenario result.
  scenario_outline = last_step_result.scenario_outline(node.name, node.location)
  formatter.after_feature_element(scenario_outline)
  self
end

#after_test_case(test_case, result) ⇒ Object


625
626
627
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 625

def after_test_case(test_case, result)
  @child.after_test_case(test_case, result)
end

#beforeObject


601
602
603
604
605
606
607
608
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 601

def before
  formatter.before_feature_element(node)
  Ast::Comments.new(node.comments).accept(formatter)
  Ast::Tags.new(node.tags).accept(formatter)
  formatter.scenario_name node.keyword, node.legacy_conflated_name_and_description, node.location.to_s, indent.of(node)
  OutlineStepsPrinter.new(formatter, configuration, indent).print(node)
  self
end

#examples_table(examples_table) ⇒ Object


616
617
618
619
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 616

def examples_table(examples_table)
  @child ||= ExamplesArrayPrinter.new(formatter, configuration).before
  @child.examples_table(examples_table)
end

#examples_table_row(node, before_hook_results) ⇒ Object


621
622
623
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 621

def examples_table_row(node, before_hook_results)
  @child.examples_table_row(node, before_hook_results)
end

#step_invocation(step_invocation, source) ⇒ Object


610
611
612
613
614
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 610

def step_invocation(step_invocation, source)
  _node, result = source.step, source.step_result
  @last_step_result = result
  @child.step_invocation(step_invocation, source)
end