We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abd2767 commit aaeab33Copy full SHA for aaeab33
spec/unit/response_spec.rb
@@ -79,11 +79,12 @@
79
end
80
81
it "should throw an exception for other codes" do
82
- RestClient::Exceptions::EXCEPTIONS_MAP.each_key do |code|
+ RestClient::Exceptions::EXCEPTIONS_MAP.each_pair do |code, exc|
83
unless (200..207).include? code
84
net_http_res = response_double(:code => code.to_i)
85
resp = RestClient::Response.create('abc', net_http_res, @request)
86
- expect { resp.return! }.to raise_error
+ allow(@request).to receive(:max_redirects).and_return(5)
87
+ expect { resp.return! }.to raise_error(exc)
88
89
90
0 commit comments