Sha256: 27350e458b560b1c429a0eba9e1d013c4136c77ff8fac31f892a07515cfd7a74

Contents?: true

Size: 688 Bytes

Versions: 2

Compression:

Stored size: 688 Bytes

Contents

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), *%w[ .. .. lib]))
require 'pathname'
require 'rubygems'
require 'test/unit'
require 'geocoder'

class SmokeTest < Test::Unit::TestCase

  def test_simple_zip_code_search
    result = Geocoder.search "27701"
    assert_not_nil (r = result.first)
    assert_equal "Durham", r.city
    assert_equal "North Carolina", r.state
  end

  def test_simple_zip_code_search_with_ssl
    Geocoder::Configuration.use_https = true
    result = Geocoder.search "27701"
    assert_not_nil (r = result.first)
    assert_equal "Durham", r.city
    assert_equal "North Carolina", r.state
  ensure
    Geocoder::Configuration.use_https = false
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
geocoder-1.1.5 test/integration/smoke_test.rb
geocoder-1.1.4 test/integration/smoke_test.rb