Module: AppMap::RSpec::FeatureAnnotations

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

Instance Method Summary collapse

Instance Method Details

#annotationsObject



106
107
108
109
110
111
112
# File 'lib/appmap/rspec.rb', line 106

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

#featureObject



83
84
85
86
87
# File 'lib/appmap/rspec.rb', line 83

def feature
  return nil unless annotations

  annotations[:feature]
end

#feature_groupObject



100
101
102
103
104
# File 'lib/appmap/rspec.rb', line 100

def feature_group
  return nil unless annotations

  annotations[:feature_group]
end

#labelsObject



89
90
91
92
93
94
95
96
97
98
# File 'lib/appmap/rspec.rb', line 89

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