Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/http/headers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def to_a
#
# @return [String]
def inspect
"#<#{self.class} #{to_h.inspect}>"
"#<#{self.class}>"
end

# Returns list of header names.
Expand Down
2 changes: 1 addition & 1 deletion lib/http/response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def parse(type = nil)

# Inspect a response
def inspect
"#<#{self.class}/#{@version} #{code} #{reason} #{headers.to_h.inspect}>"
"#<#{self.class}/#{@version} #{code} #{reason} #{mime_type}>"
end

private
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/http/headers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@

before { headers.set :set_cookie, %w[hoo=ray woo=hoo] }

it { is_expected.to eq '#<HTTP::Headers {"Set-Cookie"=>["hoo=ray", "woo=hoo"]}>' }
it { is_expected.to eq "#<HTTP::Headers>" }
end

describe "#keys" do
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/http/response_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
let(:headers) { {content_type: "text/plain"} }
let(:body) { double to_s: "foobar" }

it { is_expected.to eq '#<HTTP::Response/1.1 200 OK {"Content-Type"=>"text/plain"}>' }
it { is_expected.to eq "#<HTTP::Response/1.1 200 OK text/plain>" }
end

describe "#cookies" do
Expand Down
Loading