Method: CucumberTree.load_snapshot

Defined in:
lib/cucumber_tree.rb

.load_snapshot(world, scenario) ⇒ Object



18
19
20
21
22
23
24
25
26
27
# File 'lib/cucumber_tree.rb', line 18

def load_snapshot(world, scenario)
  parent_feature = scenario.feature.file.gsub(/\A(.*)\/.*(\.feature)\z/, '\1\2')
  snapshot = snapshots[parent_feature]
  instantiate_handlers(world, scenario)
  if snapshot.present?
    handler_instances.each do |handler|
      handler.load(snapshot)
    end
  end
end