Sha256: 5cbb95818dede7aa8133f358275b19a38984919849d1c1507fa4c36b523d2d25

Contents?: true

Size: 516 Bytes

Versions: 13

Compression:

Stored size: 516 Bytes

Contents

describe "Geolookup::Country" do
  describe "#name_to_code" do
    it "returns a country name if country code matches" do
      expect(Geolookup::Country.code_to_name("AL")).to eql("Albania")
    end

    it "returns a country code if country name matches" do
      expect(Geolookup::Country.name_to_code("Hong Kong")).to eql("HK")
    end

    it "returns a lat/long array if country name matches" do
      expect(Geolookup::Country.name_to_lat_long("United States")).to eql([38000000, -97000000])
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
geolookup-0.6.1 spec/lib/country_spec.rb
geolookup-0.6.0 spec/lib/country_spec.rb
geolookup-0.5.10 spec/lib/country_spec.rb
geolookup-0.5.9 spec/lib/country_spec.rb
geolookup-0.5.8 spec/lib/country_spec.rb
geolookup-0.5.7 spec/lib/country_spec.rb
geolookup-0.5.6 spec/lib/country_spec.rb
geolookup-0.5.5 spec/lib/country_spec.rb
geolookup-0.5.4 spec/lib/country_spec.rb
geolookup-0.5.3 spec/lib/country_spec.rb
geolookup-0.5.2 spec/lib/country_spec.rb
geolookup-0.5.1 spec/lib/country_spec.rb
geolookup-0.5.0 spec/lib/country_spec.rb