Sha256: 73596e9835144033156e5739ffb6ab3e39d757d662606b6bb7cd41e832b4cb0b

Contents?: true

Size: 567 Bytes

Versions: 5

Compression:

Stored size: 567 Bytes

Contents

require 'spec_helper'

describe GeoNamesAPI::PlaceName do
  describe "::find" do
    it "should find one place" do
      result = GeoNamesAPI::PlaceName.find("50.01","10.2")
      result.should be_present
    end

     it 'should find one place with a hash' do
      result = GeoNamesAPI::PlaceName.find(lat: 50.01, lng: 10.2)
      result.should be_present
    end
  end

  describe "::all" do
    it "should find maxRow places in 100km radius" do
      result = GeoNamesAPI::PlaceName.all("50.01","10.2","100", "3")
      result.count.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/place_name_spec.rb
geonames_api-0.1.3 spec/geonames_api/place_name_spec.rb
geonames_api-0.1.2 spec/geonames_api/place_name_spec.rb
geonames_api-0.1.1 spec/geonames_api/place_name_spec.rb
geonames_api-0.1.0 spec/geonames_api/place_name_spec.rb