Module: AppMap::RSpec::FeatureAnnotations

Included in:
ScopeExample, ScopeExampleGroup
Defined in:
lib/appmap/rspec.rb

Instance Method Summary collapse

Instance Method Details

#annotationsObject



40
41
42
43
44
45
46
# File 'lib/appmap/rspec.rb', line 40

def annotations
  .tap do |md|
    description_args_hashes.each do |h|
      md.merge! h
    end
  end
end

#featureObject



17
18
19
20
21
# File 'lib/appmap/rspec.rb', line 17

def feature
  return nil unless annotations

  annotations[:feature]
end

#feature_groupObject



34
35
36
37
38
# File 'lib/appmap/rspec.rb', line 34

def feature_group
  return nil unless annotations

  annotations[:feature_group]
end

#labelsObject



23
24
25
26
27
28
29
30
31
32
# File 'lib/appmap/rspec.rb', line 23

def labels
  labels = [:appmap]
  if labels.is_a?(Array)
    labels
  elsif labels.is_a?(String) || labels.is_a?(Symbol)
    [ labels ]
  else
    []
  end
end