sevenwire-rest-client 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/restclient/exceptions.rb +5 -0
- data/lib/restclient/request.rb +2 -0
- data/spec/request_spec.rb +5 -0
- metadata +1 -1
data/VERSION.yml
CHANGED
data/lib/restclient/request.rb
CHANGED
data/spec/request_spec.rb
CHANGED
@@ -194,6 +194,11 @@ describe RestClient::Request do
|
|
194
194
|
lambda { @request.transmit(@uri, 'req', nil) }.should raise_error(RestClient::ServerBrokeConnection)
|
195
195
|
end
|
196
196
|
|
197
|
+
it "catches Errno::ECONNREFUSED and shows the more informative ConnectionRefused" do
|
198
|
+
@http.stub!(:request).and_raise(Errno::ECONNREFUSED)
|
199
|
+
lambda { @request.transmit(@uri, 'req', nil) }.should raise_error(RestClient::ConnectionRefused)
|
200
|
+
end
|
201
|
+
|
197
202
|
it "class method execute wraps constructor" do
|
198
203
|
req = mock("rest request")
|
199
204
|
RestClient::Request.should_receive(:new).with(1 => 2).and_return(req)
|