spec/client_spec.rb in gull-0.3.2 vs spec/client_spec.rb in gull-0.3.3
- old
+ new
@@ -97,7 +97,17 @@
message = 'Could not connect to NWS web service'
client = Gull::Client.new
expect { client.fetch }.to raise_error(Gull::HttpError, message) do |error|
expect(error.original).to be_a(Errno::ECONNREFUSED)
end
+
+ stub_request(:get, 'http://alerts.weather.gov/cap/us.php?x=1')
+ .with(headers: { 'Accept' => '*/*' })
+ .to_raise(Errno::ECONNRESET)
+
+ message = 'Could not connect to NWS web service'
+ client = Gull::Client.new
+ expect { client.fetch }.to raise_error(Gull::HttpError, message) do |error|
+ expect(error.original).to be_a(Errno::ECONNRESET)
+ end
end
end