Skip to content

Commit 7f575c0

Browse files
sobrinhosausman
authored andcommitted
Fix DwollaV2::Response#inspect (#28)
1 parent 9032f66 commit 7f575c0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/dwolla_v2/response.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def method_missing method, *args, &block
4747
def inspect
4848
Util.pretty_inspect(
4949
self.class.name,
50-
{ response_status: status, response_headers: headers },
50+
{ response_status: response_status, response_headers: response_headers },
5151
response_body
5252
)
5353
end

spec/dwolla_v2/response_spec.rb

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
body: DwollaV2::SuperHash[foo: "bar"]
99
}
1010

11+
it "#inspect" do
12+
response = DwollaV2::Response.new raw_response
13+
expect(response.inspect).to eq '#<DwollaV2::Response response_status=200 response_headers={:location=>"https://foo.bar"} {"foo"=>"bar"}>'
14+
end
15+
1116
it "#status" do
1217
response = DwollaV2::Response.new raw_response
1318
expect(response.response_status).to be raw_response.status

0 commit comments

Comments
 (0)