Stub Faraday request with Webmock - help needed
问题 I need help stubbing a request using Faraday gem. I am making this request URL='https://secure.snd.payu.com//pl/standard/user/oauth/authorize'.freeze url_encoded = 'grant_type=client_credentials' \ + "&client_id=#{ENV['client_id'}" \ + "&client_secret=#{ENV['client_secret'}" connection = Faraday.new do |con| con.response :oj, content_type: /\bjson$/ con.adapter Faraday.default_adapter end connection.post(URL, url_encoded) which outputs #<Faraday::Response:0x00000000016ff620 @on_complete