blob: 57f22d26a5e8776aa304eeae482ee79639bfb73d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
RSpec.describe TomTom do
let(:tomtom) { TomTom.new }
describe "#convert_way_costs_for_batch" do
it "turns WayCost points into a collection of colon-separated strings" do
way_costs = [
WayCost.new(
departure: Geokit::LatLng.new(2, 48),
arrival: Geokit::LatLng.new(3, 46)
),
WayCost.new(
departure: Geokit::LatLng.new(-71, 42),
arrival: Geokit::LatLng.new(-71.5, 42.9)
)
]
expect(
tomtom.convert_way_costs_for_batch(way_costs)
).to eq([
'2,48:3,46',
'-71,42:-71.5,42.9'
])
end
end
end
|