Class: Cucumber::Formatter::LegacyApi::Adapter::ScenarioPrinter
- Inherits:
-
Struct
- Object
- Struct
- Cucumber::Formatter::LegacyApi::Adapter::ScenarioPrinter
show all
- Includes:
- PrintsAfterHooks
- Defined in:
- lib/cucumber/formatter/legacy_api/adapter.rb
Instance Method Summary
collapse
#after_hook, #after_hook_results
Instance Method Details
#after ⇒ Object
555
556
557
558
559
560
561
562
563
|
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 555
def after
return if @done
@child.after if @child
scenario = LegacyResultBuilder.new(@test_case_result).scenario(node.name, node.location)
after_hook_results.accept(formatter)
formatter.after_feature_element(scenario)
@done = true
self
end
|
#after_step_hook(result) ⇒ Object
546
547
548
|
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 546
def after_step_hook(result)
result.accept formatter
end
|
#after_test_case(_test_case, result) ⇒ Object
550
551
552
553
|
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 550
def after_test_case(_test_case, result)
@test_case_result = result
after
end
|
#before ⇒ Object
532
533
534
535
536
537
538
539
|
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 532
def before
formatter.before_feature_element(node)
Ast::Comments.new(node.).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)
before_hook_results.accept(formatter)
self
end
|
#step_invocation(step_invocation, _source) ⇒ Object
541
542
543
544
|
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 541
def step_invocation(step_invocation, _source)
@child ||= StepsPrinter.new(formatter).before
@child.step_invocation step_invocation
end
|