From 25613ed161153843fe8d376b72364a9289022d80 Mon Sep 17 00:00:00 2001 From: Mike Dillon Date: Thu, 12 Nov 2015 21:27:17 -0800 Subject: [PATCH] Fix Rubocop griping in strategy_spec.rb --- spec/omniauth/strategy_spec.rb | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/spec/omniauth/strategy_spec.rb b/spec/omniauth/strategy_spec.rb index d7c2081..8c661ff 100644 --- a/spec/omniauth/strategy_spec.rb +++ b/spec/omniauth/strategy_spec.rb @@ -545,24 +545,24 @@ describe OmniAuth::Strategy do context 'options mutation' do before do - @options = { :dup => true } + @options = {:dup => true} end context 'in request phase' do it 'does not affect original options' do - @options.merge!({ + @options.merge!( :test_option => true, - :mutate_on_request => proc { |options| options.delete(:test_option) } - }) + :mutate_on_request => proc { |options| options.delete(:test_option) }, + ) expect { strategy.call(make_env) }.to raise_error('Request Phase') expect(strategy.options).to have_key(:test_option) end it 'does not affect deep options' do - @options.merge!({ - :deep_option => { :test_option => true }, - :mutate_on_request => proc { |options| options[:deep_option].delete(:test_option) } - }) + @options.merge!( + :deep_option => {:test_option => true}, + :mutate_on_request => proc { |options| options[:deep_option].delete(:test_option) }, + ) expect { strategy.call(make_env) }.to raise_error('Request Phase') expect(strategy.options[:deep_option]).to have_key(:test_option) end @@ -570,19 +570,19 @@ describe OmniAuth::Strategy do context 'in callback phase' do it 'does not affect original options' do - @options.merge!({ + @options.merge!( :test_option => true, - :mutate_on_callback => proc { |options| options.delete(:test_option) } - }) + :mutate_on_callback => proc { |options| options.delete(:test_option) }, + ) expect { strategy.call(make_env('/auth/test/callback', 'REQUEST_METHOD' => 'POST')) }.to raise_error('Callback Phase') expect(strategy.options).to have_key(:test_option) end it 'does not affect deep options' do - @options.merge!({ - :deep_option => { :test_option => true }, - :mutate_on_callback => proc { |options| options[:deep_option].delete(:test_option) } - }) + @options.merge!( + :deep_option => {:test_option => true}, + :mutate_on_callback => proc { |options| options[:deep_option].delete(:test_option) }, + ) expect { strategy.call(make_env('/auth/test/callback', 'REQUEST_METHOD' => 'POST')) }.to raise_error('Callback Phase') expect(strategy.options[:deep_option]).to have_key(:test_option) end