Sha256: b4d34e0e3a1faba5528b85f6e0c6cd0c79f653bd11a46948e5a67fd75f9a9b36
Contents?: true
Size: 1.08 KB
Versions: 3
Compression:
Stored size: 1.08 KB
Contents
require 'spec_helper' describe Weather::Location, :vcr do it 'should contain city, country, and region as strings' do response = Weather.lookup 9848 expect(response.location.city).to be_a String expect(response.location.city).to be_a String expect(response.location.region).to be_a String expect(response.location.country).to be_a String end it 'should be able to look up Seattle, WA' do response = Weather.lookup 2490383 expect(response.location.city).to eq 'Seattle' expect(response.location.region).to eq 'WA' expect(response.location.country).to eq 'United States' end it 'should be able to look up Victoria, BC' do response = Weather.lookup 9848 expect(response.location.city).to eq 'Victoria' expect(response.location.region).to eq 'BC' expect(response.location.country).to eq 'Canada' end it 'should be able to look up Nice, France' do response = Weather.lookup 614274 expect(response.location.city).to eq 'Nice' expect(response.location.region).to eq '' expect(response.location.country).to eq 'France' end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
weather-api-1.2.0 | spec/lib/location_spec.rb |
weather-api-1.1.1 | spec/lib/location_spec.rb |
weather-api-1.1.0 | spec/lib/location_spec.rb |