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
yoyle439587298-0.13.0 spec/httparty/logger/curl_logger_spec.rb
httparty-0.13.0 spec/httparty/logger/curl_logger_spec.rb
httparty-0.12.0 spec/httparty/logger/curl_logger_spec.rb