Sha256: 992d8b9758d395e75b4840867e5be314584c0a12199246cc4a86aff9d659004f

Contents?: true

Size: 606 Bytes

Versions: 2

Compression:

Stored size: 606 Bytes

Contents

require 'spec_helper'

describe GeoNamesAPI::NearestIntersection do
  
  describe '::find' do
    
    context 'given the latitude and longitude for a point inside the United States' do
      
      # Manhattan, Kansas, USA
      let(:latitude)  { 39.191253   }
      let(:longitude) { -96.573737  }
      
      it 'returns the two street names of the nearest intersection' do
        response = described_class.find(latitude,longitude)
        
        response.intersection["street1"].should eq('Bertrand St')
        response.intersection["street2"].should eq('N 11th St')
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
geonames_api-0.1.4 spec/geonames_api/nearest_intersection_spec.rb
geonames_api-0.1.3 spec/geonames_api/nearest_intersection_spec.rb