sevenwire-rest-client 0.9.5 → 0.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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)
|