Skip to content

Commit aaeab33

Browse files
committed
Fix warnings and accidentally passing test.
1 parent abd2767 commit aaeab33

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spec/unit/response_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,12 @@
7979
end
8080

8181
it "should throw an exception for other codes" do
82-
RestClient::Exceptions::EXCEPTIONS_MAP.each_key do |code|
82+
RestClient::Exceptions::EXCEPTIONS_MAP.each_pair do |code, exc|
8383
unless (200..207).include? code
8484
net_http_res = response_double(:code => code.to_i)
8585
resp = RestClient::Response.create('abc', net_http_res, @request)
86-
expect { resp.return! }.to raise_error
86+
allow(@request).to receive(:max_redirects).and_return(5)
87+
expect { resp.return! }.to raise_error(exc)
8788
end
8889
end
8990
end

0 commit comments

Comments
 (0)