|
1 |
| -describe "Current weather information with APPID" do |
| 1 | +describe 'Current weather information with APPID' do |
2 | 2 | let(:options) do
|
3 |
| - { units: "metric", APPID: 1111111111 } |
| 3 | + { units: 'metric', APPID: 1111111111 } |
4 | 4 | end
|
5 | 5 |
|
6 |
| - describe "searching by city" do |
7 |
| - context "when the city is found" do |
| 6 | + describe 'searching by city' do |
| 7 | + context 'when the city is found' do |
8 | 8 | let(:weather) do
|
9 |
| - VCR.use_cassette("integration/current_by_city") do |
10 |
| - OpenWeather::Current.city("Berlin, DE", options) |
| 9 | + VCR.use_cassette('integration/current_by_city') do |
| 10 | + OpenWeather::Current.city('Berlin, DE', options) |
11 | 11 | end
|
12 | 12 | end
|
13 | 13 |
|
14 |
| - it "returns results" do |
15 |
| - expect(weather).to include("weather") |
| 14 | + it 'returns results' do |
| 15 | + expect(weather).to include('weather') |
16 | 16 | end
|
17 | 17 | end
|
18 | 18 |
|
19 |
| - context "when the city is not found" do |
| 19 | + context 'when the city is not found' do |
20 | 20 | let(:weather) do
|
21 |
| - VCR.use_cassette("integration/current_not_found_city") do |
22 |
| - OpenWeather::Current.city("Berlin, DE", options) |
| 21 | + VCR.use_cassette('integration/current_not_found_city') do |
| 22 | + OpenWeather::Current.city('Berlin, DE', options) |
23 | 23 | end
|
24 | 24 | end
|
25 | 25 |
|
26 |
| - it "returns an attribute with code 404" do |
27 |
| - expect(weather["cod"]).to eq("404") |
| 26 | + it 'returns an attribute with code 404' do |
| 27 | + expect(weather['cod']).to eq('404') |
28 | 28 | end
|
29 | 29 | end
|
30 | 30 | end
|
31 | 31 |
|
32 |
| - describe "searching by geolocation" do |
| 32 | + describe 'searching by geolocation' do |
33 | 33 | let(:weather) do
|
34 |
| - VCR.use_cassette("integration/current_by_geocode") do |
| 34 | + VCR.use_cassette('integration/current_by_geocode') do |
35 | 35 | OpenWeather::Current.geocode(48.140938, 11.582005, options)
|
36 | 36 | end
|
37 | 37 | end
|
38 | 38 |
|
39 |
| - it "returns results" do |
40 |
| - expect(weather).to include("weather") |
| 39 | + it 'returns results' do |
| 40 | + expect(weather).to include('weather') |
41 | 41 | end
|
42 | 42 | end
|
43 | 43 |
|
44 |
| - describe "searching by city_id" do |
| 44 | + describe 'searching by city_id' do |
45 | 45 | let(:weather) do
|
46 |
| - VCR.use_cassette("integration/current_by_city_id") do |
| 46 | + VCR.use_cassette('integration/current_by_city_id') do |
47 | 47 | OpenWeather::Current.city_id(524901, options)
|
48 | 48 | end
|
49 | 49 | end
|
50 | 50 |
|
51 |
| - it "returns results" do |
52 |
| - expect(weather).to include("weather") |
| 51 | + it 'returns results' do |
| 52 | + expect(weather).to include('weather') |
53 | 53 | end
|
54 | 54 | end
|
55 | 55 | end
|
0 commit comments