Class: Cucumber::Formatter::LegacyApi::Adapter
- Inherits:
-
Struct
- Object
- Struct
- Cucumber::Formatter::LegacyApi::Adapter
- Extended by:
- Forwardable
- Defined in:
- lib/cucumber/formatter/legacy_api/adapter.rb
Defined Under Namespace
Modules: PrintsAfterHooks, TestCaseSource, TestStepSource Classes: AfterHookPrinter, BackgroundPrinter, Embedding, ExamplesArrayPrinter, ExamplesTablePrinter, ExpandTableRowPrinter, FeaturePrinter, FeaturesPrinter, HeaderTableRowPrinter, HiddenBackgroundPrinter, Indent, LegacyResultBuilder, OutlineStepsPrinter, ScenarioOutlinePrinter, ScenarioPrinter, StepsPrinter, TableRowPrinter, TableRowPrinterBase
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#formatter ⇒ Object
Returns the value of attribute formatter.
-
#results ⇒ Object
Returns the value of attribute results.
Instance Method Summary collapse
-
#initialize ⇒ Adapter
constructor
A new instance of Adapter.
- #puts(*messages) ⇒ Object
Constructor Details
#initialize ⇒ Adapter
Returns a new instance of Adapter.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 16 def initialize(*) super emit_deprecation_warning @matches = collect_matches config.on_event(:test_case_started) do |event| formatter.before_test_case(event.test_case) printer.before_test_case(event.test_case) end config.on_event(:test_step_started) do |event| formatter.before_test_step(event.test_step) printer.before_test_step(event.test_step) end config.on_event(:test_step_finished) do |event| test_step, result = *event.attributes printer.after_test_step(test_step, result) formatter.after_test_step(test_step, result.with_filtered_backtrace(Cucumber::Formatter::BacktraceFilter)) end config.on_event(:test_case_finished) do |event| test_case, result = *event.attributes record_test_case_result(test_case, result) printer.after_test_case(test_case, result) formatter.after_test_case(test_case, result.with_filtered_backtrace(Cucumber::Formatter::BacktraceFilter)) end config.on_event(:test_run_finished) do printer.after formatter.done end end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config
13 14 15 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 13 def config @config end |
#formatter ⇒ Object
Returns the value of attribute formatter
13 14 15 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 13 def formatter @formatter end |
#results ⇒ Object
Returns the value of attribute results
13 14 15 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 13 def results @results end |
Instance Method Details
#puts(*messages) ⇒ Object
49 50 51 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 49 def puts(*) printer.puts() end |