Sha256: 034faca9e2b83baf340589100465bea87f612a21b87bb762db25b702c1c94e12

Contents?: true

Size: 614 Bytes

Versions: 23

Compression:

Stored size: 614 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper'))

describe HTTParty::Logger::CurlLogger do
  describe "#format" do
    it "formats a response in a style that resembles a -v curl" do
      logger_double = double
      logger_double.should_receive(:info).with(
          /\[HTTParty\] \[\d{4}-\d\d-\d\d \d\d:\d\d:\d\d\ [+-]\d{4}\] > GET http:\/\/localhost/)

      subject = described_class.new(logger_double, :info)

      stub_http_response_with("google.html")

      response = HTTParty::Request.new.perform
      subject.format(response.request, response)
    end
  end
end

Version data entries

23 entries across 22 versions & 7 rubygems

Version Path
alloy_sdk-0.1.0 vendor/bundle/ruby/2.6.0/gems/httparty-0.13.1/spec/httparty/logger/curl_logger_spec.rb
alloy_sdk-0.1.0 vendor/bundle/ruby/3.0.0/gems/httparty-0.13.1/spec/httparty/logger/curl_logger_spec.rb
httsoiree-0.13.3 spec/httparty/logger/curl_logger_spec.rb
allegro_api_client-0.0.9 gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/logger/curl_logger_spec.rb
httparty-0.13.3 spec/httparty/logger/curl_logger_spec.rb
allegro_api_client-0.0.8 gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/logger/curl_logger_spec.rb
allegro_api_client-0.0.7 gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/logger/curl_logger_spec.rb
httparty-0.13.2 spec/httparty/logger/curl_logger_spec.rb
asana2flowdock-1.0.0 vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/logger/curl_logger_spec.rb
allegro_api_client-0.0.6 gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/logger/curl_logger_spec.rb
allegro_api_client-0.0.5 gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/logger/curl_logger_spec.rb
allegro_api_client-0.0.4 gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/logger/curl_logger_spec.rb
allegro_api_client-0.0.3 gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/logger/curl_logger_spec.rb
allegro_api_client-0.0.2 gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/logger/curl_logger_spec.rb
allegro_api_client-0.0.1 gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/logger/curl_logger_spec.rb
httsoiree-0.13.1.1 spec/httparty/logger/curl_logger_spec.rb
httsoiree-0.13.1 spec/httparty/logger/curl_logger_spec.rb
httparty-enterprise-edition-0.13.1.1 spec/httparty/logger/curl_logger_spec.rb
httparty-enterprise-edition-0.13.1 spec/httparty/logger/curl_logger_spec.rb
httparty-0.13.1 spec/httparty/logger/curl_logger_spec.rb