# File lib/omniauth/core.rb, line 56 def add_mock(provider, mock={}) # Stringify keys recursively one level. mock.stringify_keys! mock.keys.each do|key| if mock[key].is_a? Hash mock[key].stringify_keys! end end # Merge with the default mock and ensure provider is correct. mock = self.mock_auth[:default].dup.merge(mock) mock["provider"] = provider.to_s # Add it to the mocks. self.mock_auth[provider.to_sym] = mock end