diff --git a/test/integration/smoke_test.rb b/test/integration/smoke_test.rb index 8d80e1e14730cd9ad53072ef2ff9c07c5f4cf373..b0c805e61759fc9695c14bde1c0c8eca8d0d1802 100644 --- a/test/integration/smoke_test.rb +++ b/test/integration/smoke_test.rb @@ -8,15 +8,17 @@ class SmokeTest < Test::Unit::TestCase def test_simple_zip_code_search result = Geocoder.search "27701" - assert_equal "Durham", result.first.city - assert_equal "North Carolina", result.first.state + 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_equal "Durham", result.first.city - assert_equal "North Carolina", result.first.state + assert_not_nil (r = result.first) + assert_equal "Durham", r.city + assert_equal "North Carolina", r.state ensure Geocoder::Configuration.use_https = false end