Sha256: 9bdd498fb0552495fae190937744512be96158281a338b90b057931583329aeb
Contents?: true
Size: 722 Bytes
Versions: 2
Compression:
Stored size: 722 Bytes
Contents
require 'spec_helper' describe GeoNamesAPI::CountrySubdivision do def expected_sf(result) expect(result).to be_present expect(result.admin_code1).to eq('CA') expect(result.admin_name1).to eq('California') expect(result.country_code).to eq('US') expect(result.country_name).to eq('United States') end describe '::find' do it 'expect to find one subdivision' do result = GeoNamesAPI::CountrySubdivision.find(37.8, -122.4) expected_sf(result) end end describe '::all' do it 'expect to find multiple subdivisions' do result = GeoNamesAPI::CountrySubdivision.all(37.8, -122.4) expect(result.size).to be > 0 expected_sf(result.first) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
geonames_api-0.1.6 | spec/geonames_api/country_subdivision_spec.rb |
geonames_api-0.1.5 | spec/geonames_api/country_subdivision_spec.rb |