diff --git a/lib/http/headers.rb b/lib/http/headers.rb index 5f285616..9898e220 100644 --- a/lib/http/headers.rb +++ b/lib/http/headers.rb @@ -147,7 +147,7 @@ def to_a # # @return [String] def inspect - "#<#{self.class} #{to_h.inspect}>" + "#<#{self.class}>" end # Returns list of header names. diff --git a/lib/http/response.rb b/lib/http/response.rb index 6212b5a6..5ac74c86 100644 --- a/lib/http/response.rb +++ b/lib/http/response.rb @@ -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 diff --git a/spec/lib/http/headers_spec.rb b/spec/lib/http/headers_spec.rb index e4ac774d..e5ae4210 100644 --- a/spec/lib/http/headers_spec.rb +++ b/spec/lib/http/headers_spec.rb @@ -282,7 +282,7 @@ before { headers.set :set_cookie, %w[hoo=ray woo=hoo] } - it { is_expected.to eq '#["hoo=ray", "woo=hoo"]}>' } + it { is_expected.to eq "#" } end describe "#keys" do diff --git a/spec/lib/http/response_spec.rb b/spec/lib/http/response_spec.rb index fc4bbd7e..3ce24881 100644 --- a/spec/lib/http/response_spec.rb +++ b/spec/lib/http/response_spec.rb @@ -155,7 +155,7 @@ let(:headers) { {content_type: "text/plain"} } let(:body) { double to_s: "foobar" } - it { is_expected.to eq '#"text/plain"}>' } + it { is_expected.to eq "#" } end describe "#cookies" do