Sha256: f807cac120b98805d3130674c44a50a37b7c793ace72de9e826ac79a9db1df03
Contents?: true
Size: 705 Bytes
Versions: 1
Compression:
Stored size: 705 Bytes
Contents
# encoding: utf-8 require 'test_helper' class ProxyTest < Test::Unit::TestCase def setup Geocoder::Configuration.set_defaults end def test_uses_proxy_when_specified Geocoder::Configuration.http_proxy = 'localhost' lookup = Geocoder::Lookup::Google.new assert lookup.send(:http_client).proxy_class? end def test_doesnt_use_proxy_when_not_specified lookup = Geocoder::Lookup::Google.new assert !lookup.send(:http_client).proxy_class? end def test_exception_raised_on_bad_proxy_url Geocoder::Configuration.http_proxy = ' \\_O< Quack Quack' assert_raise Geocoder::ConfigurationError do Geocoder::Lookup::Google.new.send(:http_client) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
geocoder-1.0.2 | test/proxy_test.rb |