Prefer to_s over string interpolation

This commit is contained in:
Erik Michaels-Ober 2016-08-08 10:54:52 -07:00
parent 518e9b6a07
commit acd909d3a8
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ module OmniAuth
middleware = klass
else
begin
middleware = OmniAuth::Strategies.const_get("#{OmniAuth::Utils.camelize(klass.to_s)}")
middleware = OmniAuth::Strategies.const_get((OmniAuth::Utils.camelize(klass.to_s)).to_s)
rescue NameError
raise(LoadError.new("Could not find matching strategy for #{klass.inspect}. You may need to install an additional gem (such as omniauth-#{klass})."))
end

View File

@ -155,7 +155,7 @@ describe OmniAuth::Strategy do
end
%w(request_phase).each do |abstract_method|
context "#{abstract_method}" do
context abstract_method.to_s do
it 'raises a NotImplementedError' do
strat = Class.new
strat.send :include, OmniAuth::Strategy