Module: AppMap::Cucumber

Defined in:
lib/appmap/cucumber.rb

Defined Under Namespace

Classes: Provider4, ProviderBefore4, ProviderStruct, ScenarioAttributes

Constant Summary collapse

APPMAP_OUTPUT_DIR =
'tmp/appmap/cucumber'

Class Method Summary collapse

Class Method Details

.enabled?Boolean

Returns:

  • (Boolean)


58
59
60
# File 'lib/appmap/cucumber.rb', line 58

def enabled?
  AppMap.recording_enabled?(:cucumber)
end

.initObject



45
46
47
48
49
# File 'lib/appmap/cucumber.rb', line 45

def init
  warn 'Configuring AppMap recorder for Cucumber'

  FileUtils.mkdir_p APPMAP_OUTPUT_DIR
end

.runObject



62
63
64
# File 'lib/appmap/cucumber.rb', line 62

def run
  init
end

.write_scenario(scenario, appmap) ⇒ Object



51
52
53
54
55
56
# File 'lib/appmap/cucumber.rb', line 51

def write_scenario(scenario, appmap)
  appmap['metadata'] = (scenario, appmap['metadata'])
  scenario_filename = AppMap::Util.scenario_filename(appmap['metadata']['name'])

  AppMap::Util.write_appmap(File.join(APPMAP_OUTPUT_DIR, scenario_filename), appmap)
end