Sha256: 98698d09a38346f065f43e70d07e3cecf1381b1f8682780c24807a114ee43c15

Contents?: true

Size: 588 Bytes

Versions: 2

Compression:

Stored size: 588 Bytes

Contents

require 'spec_helper'

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

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

  describe "::all" do
    it "expect to find maxRow places in 100km radius" do
      result = GeoNamesAPI::PlaceName.all("50.01","10.2","100", "3")
      expect(result.size).to eq(3)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
geonames_api-0.1.6 spec/geonames_api/place_name_spec.rb
geonames_api-0.1.5 spec/geonames_api/place_name_spec.rb