module RSpec::Core::MetadataHashBuilder::Common

@private

Public Instance Methods

build_metadata_hash_from(args) click to toggle source
# File lib/rspec/core/metadata_hash_builder.rb, line 7
def build_metadata_hash_from(args)
  metadata = args.last.is_a?(Hash) ? args.pop : {}

  if RSpec.configuration.treat_symbols_as_metadata_keys_with_true_values?
    add_symbols_to_hash(metadata, args)
  else
    warn_about_symbol_usage(args)
  end

  metadata
end