|
|
@@ -12,22 +12,22 @@ describe Location do
|
12
|
12
|
|
13
|
13
|
it "converts values to Float" do
|
14
|
14
|
expect(location.lat).to be_a Float
|
15
|
|
- expect(location.lat).to be 2.0
|
|
15
|
+ expect(location.lat).to eq 2.0
|
16
|
16
|
expect(location.lng).to be_a Float
|
17
|
|
- expect(location.lng).to be 3.0
|
|
17
|
+ expect(location.lng).to eq 3.0
|
18
|
18
|
expect(location.radius).to be_a Float
|
19
|
|
- expect(location.radius).to be 300.0
|
|
19
|
+ expect(location.radius).to eq 300.0
|
20
|
20
|
expect(location.speed).to be_a Float
|
21
|
|
- expect(location.speed).to be 2.0
|
|
21
|
+ expect(location.speed).to eq 2.0
|
22
|
22
|
expect(location.course).to be_a Float
|
23
|
|
- expect(location.course).to be 30.0
|
|
23
|
+ expect(location.course).to eq 30.0
|
24
|
24
|
end
|
25
|
25
|
|
26
|
26
|
it "provides hash-style access to its properties with both symbol and string keys" do
|
27
|
27
|
expect(location[:lat]).to be_a Float
|
28
|
|
- expect(location[:lat]).to be 2.0
|
|
28
|
+ expect(location[:lat]).to eq 2.0
|
29
|
29
|
expect(location['lat']).to be_a Float
|
30
|
|
- expect(location['lat']).to be 2.0
|
|
30
|
+ expect(location['lat']).to eq 2.0
|
31
|
31
|
end
|
32
|
32
|
|
33
|
33
|
it "does not allow hash-style assignment" do
|