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

Inherits:
Struct
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeAdapter

Returns a new instance of Adapter.



15
16
17
18
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 15

def initialize(*)
  super
  @matches = collect_matches
end

Instance Attribute Details

#configObject

Returns the value of attribute config

Returns:

  • (Object)

    the current value of config



12
13
14
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 12

def config
  @config
end

#formatterObject

Returns the value of attribute formatter

Returns:

  • (Object)

    the current value of formatter



12
13
14
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 12

def formatter
  @formatter
end

#resultsObject

Returns the value of attribute results

Returns:

  • (Object)

    the current value of results



12
13
14
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 12

def results
  @results
end

Instance Method Details

#after_test_case(test_case, result) ⇒ Object



41
42
43
44
45
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 41

def after_test_case(test_case, result)
  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

#after_test_step(test_step, result) ⇒ Object



36
37
38
39
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 36

def after_test_step(test_step, result)
  printer.after_test_step(test_step, result)
  formatter.after_test_step(test_step, result.with_filtered_backtrace(Cucumber::Formatter::BacktraceFilter))
end

#before_test_case(test_case) ⇒ Object



26
27
28
29
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 26

def before_test_case(test_case)
  formatter.before_test_case(test_case)
  printer.before_test_case(test_case)
end

#before_test_step(test_step) ⇒ Object



31
32
33
34
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 31

def before_test_step(test_step)
  formatter.before_test_step(test_step)
  printer.before_test_step(test_step)
end

#doneObject



51
52
53
54
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 51

def done
  printer.after
  formatter.done
end

#puts(*messages) ⇒ Object



47
48
49
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 47

def puts(*messages)
  printer.puts(messages)
end