Sha256: 9adbea965e03c73b9145ef8d8ca66b458506a2eb6c7418adc526dd15a299aee7

Contents?: true

Size: 684 Bytes

Versions: 5

Compression:

Stored size: 684 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.configure(: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.configure(:use_https => false)
  end

end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
geocoder-1.1.9 test/integration/smoke_test.rb
geocoder-1.1.8 test/integration/smoke_test.rb
geocoder-1.1.7 test/integration/smoke_test.rb
geocoder-sgonyea-1.1.6.1 test/integration/smoke_test.rb
geocoder-1.1.6 test/integration/smoke_test.rb