Fix code format

This commit is contained in:
Fujimura Daisuke 2015-11-11 13:14:34 +09:00
parent 08ecbbfa1d
commit 9669152851
2 changed files with 3 additions and 3 deletions

View File

@ -87,7 +87,7 @@ module OmniAuth
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] }]
Hash[val.each_pair { |k, v| [k.to_s, v] }]
else
val
end

View File

@ -90,7 +90,7 @@ describe OmniAuth do
describe 'mock auth' do
before do
@auth_hash = { :uid => '12345', :info => {:name => 'Joe', :email => 'joe@example.com'} }
@auth_hash = {:uid => '12345', :info => {:name => 'Joe', :email => 'joe@example.com'}}
@original_auth_hash = Marshal.load(Marshal.dump(@auth_hash))
OmniAuth.config.add_mock(:facebook, @auth_hash)
@ -113,7 +113,7 @@ describe OmniAuth do
end
end
it 'does not mutate given auth hash' do
OmniAuth.configure do |config|
OmniAuth.configure do
expect(@auth_hash).to eq @original_auth_hash
end
end