Sha256: 1aa874db05b9ab2f0bac5333f673d5cf9e775bee11c5afd8721f574f96ca3459
Contents?: true
Size: 627 Bytes
Versions: 5
Compression:
Stored size: 627 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')) RSpec.describe HTTParty::Logger::CurlFormatter do describe "#format" do it "formats a response in a style that resembles a -v curl" do logger_double = double expect(logger_double).to 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
5 entries across 4 versions & 3 rubygems