Class: Cucumber::Formatter::LegacyApi::Adapter::BackgroundPrinter
- Inherits:
-
Struct
- Object
- Struct
- Cucumber::Formatter::LegacyApi::Adapter::BackgroundPrinter
- Defined in:
- lib/cucumber/formatter/legacy_api/adapter.rb
Instance Method Summary collapse
- #after ⇒ Object
- #after_hook ⇒ Object
- #after_step_hook(result) ⇒ Object
- #after_test_case ⇒ Object
- #before ⇒ Object
- #failed? ⇒ Boolean
- #step_invocation(step_invocation, source) ⇒ Object
Instance Method Details
#after ⇒ Object
490 491 492 493 494 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 490 def after @child.after if @child formatter.after_background(Ast::Background.new(feature, node)) self end |
#after_hook ⇒ Object
467 468 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 467 def after_hook(*) end |
#after_step_hook(result) ⇒ Object
478 479 480 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 478 def after_step_hook(result) result.accept formatter end |
#after_test_case ⇒ Object
464 465 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 464 def after_test_case(*) end |
#before ⇒ Object
470 471 472 473 474 475 476 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 470 def before formatter.before_background Ast::Background.new(feature, node) Ast::Comments.new(node.comments).accept(formatter) formatter.background_name node.keyword, node.legacy_conflated_name_and_description, node.location.to_s, indent.of(node) before_hook_results.accept(formatter) self end |
#failed? ⇒ Boolean
496 497 498 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 496 def failed? @failed end |
#step_invocation(step_invocation, source) ⇒ Object
482 483 484 485 486 487 488 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 482 def step_invocation(step_invocation, source) @child ||= StepsPrinter.new(formatter).before @child.step_invocation step_invocation if source.step_result.status == :failed @failed = true end end |