Class: ParallelReportPortal::Cucumber::Formatter

Inherits:
Object
  • Object
show all
Defined in:
lib/parallel_report_portal/cucumber/formatter.rb

Overview

Formatter supporting the Cucumber formatter API. This is the class which does the heavy-lifting by integrating with cucumber.

Constant Summary collapse

CucumberMessagesVersion =
[4,0,0]

Instance Method Summary collapse

Constructor Details

#initialize(cucumber_config) ⇒ Formatter

Create a new formatter instance

Parameters:

  • cucumber_config (Cucumber::Configuration)

    the cucumber configuration environment



15
16
17
18
19
20
21
22
23
24
# File 'lib/parallel_report_portal/cucumber/formatter.rb', line 15

def initialize(cucumber_config)
  @ast_lookup = if (::Cucumber::VERSION.split('.').map(&:to_i) <=> CucumberMessagesVersion) > 0
    require 'cucumber/formatter/ast_lookup'
    ::Cucumber::Formatter::AstLookup.new(cucumber_config)
  else
    nil
  end
  start_background_thread.priority = Thread.main.priority + 1 
  register_event_handlers(cucumber_config)
end