class OmniAuth::Configuration

def add_mock(provider, original = {})

def add_mock(provider, original = {})
  # Create key-stringified new hash from given auth hash
  mock = {}
  original.each_pair do |key, val|
    mock[key.to_s] = if val.is_a? Hash
                       Hash[val.each_pair { |k, v| [k.to_s, v] }]
                     else
                       val
                     end
  end
  # Merge with the default mock and ensure provider is correct.
  mock = mock_auth[:default].dup.merge(mock)
  mock['provider'] = provider.to_s
  # Add it to the mocks.
  mock_auth[provider.to_sym] = mock
end