chore: Rubocop lint Style/MissingRespondToMissing (#930)

This commit is contained in:
Geoff Hubbard 2019-03-04 23:25:25 +01:00 committed by Olle Jonsson
parent dbba0734d6
commit e342992751
3 changed files with 7 additions and 6 deletions

View File

@ -76,11 +76,6 @@ Style/GuardClause:
- 'lib/faraday/request/url_encoded.rb'
- 'lib/faraday/utils/headers.rb'
# Offense count: 1
Style/MissingRespondToMissing:
Exclude:
- 'lib/faraday.rb'
# Offense count: 1
Style/MultipleComparison:
Exclude:

View File

@ -102,7 +102,7 @@ module Faraday
@default_adapter = adapter
end
def respond_to?(symbol, include_private = false)
def respond_to_missing?(symbol, include_private = false)
default_connection.respond_to?(symbol, include_private) || super
end

View File

@ -24,6 +24,12 @@ RSpec.describe Faraday do
)
end
it 'proxied methods can be accessed' do
allow(mock_connection).to receive(:this_should_be_proxied)
expect(Faraday.method(:this_should_be_proxied)).to be_a(Method)
end
after do
Faraday.default_connection = nil
end