Module: RSpec::Core::Metadata::GroupMetadataHash
- Includes:
- MetadataHash
- Defined in:
- lib/rspec/core/metadata.rb
Instance Method Summary collapse
Methods included from MetadataHash
Instance Method Details
#described_class_for ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/rspec/core/metadata.rb', line 64 def described_class_for(*) ancestors.each do |g| return g[:describes] if g.has_key?(:describes) end ancestors.reverse.each do |g| candidate = g[:description_args].first return candidate unless String === candidate || Symbol === candidate end nil end |
#full_description_for ⇒ Object
77 78 79 80 81 |
# File 'lib/rspec/core/metadata.rb', line 77 def full_description_for(*) build_description_from(*ancestors.reverse.map do |a| a.has_key?(:full_description) ? a[:full_description] : a[:description_args] end.flatten) end |