Sha256: 73ecde8a52c0e3014c006d3a1bc3fa959abf84921c4ba8a87df42ec645315dde

Contents?: true

Size: 545 Bytes

Versions: 5

Compression:

Stored size: 545 Bytes

Contents

require 'spec_helper'

describe GeoNamesAPI::Street do
  describe "::find" do
    it "should find one Street" do
      result = GeoNamesAPI::Street.find(37.451, -122.18)
      result.should be_present
    end

    it "should not find streets outside of the US" do
      result = GeoNamesAPI::Street.find(50.01, 10.2)
      result.should == nil
    end
  end

  describe "::all" do
    it "should find multiple Streets in 100km radius" do
      result = GeoNamesAPI::Street.all(37.8, -122.4, 1, 3)
      result.size.should == 3
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
geonames_api-0.1.4 spec/geonames_api/street_spec.rb
geonames_api-0.1.3 spec/geonames_api/street_spec.rb
geonames_api-0.1.2 spec/geonames_api/street_spec.rb
geonames_api-0.1.1 spec/geonames_api/street_spec.rb
geonames_api-0.1.0 spec/geonames_api/street_spec.rb