From 05d2014dff30901feba5c9aab3e066d89d3771ca Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 12 Mar 2018 12:50:43 +0100 Subject: TomTom: Provide `TomTom.batch(...)` method This change enables us to call `TomTom.batch(...)` instead of `TomTom.new.batch(...)` a couple commits ago. This is nice because the initialisation was kind of unnecessary for users of the class. Refs #6095 --- spec/lib/tom_tom/batch_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/lib') diff --git a/spec/lib/tom_tom/batch_spec.rb b/spec/lib/tom_tom/batch_spec.rb index 5aff970eb..aee1a2f1d 100644 --- a/spec/lib/tom_tom/batch_spec.rb +++ b/spec/lib/tom_tom/batch_spec.rb @@ -1,5 +1,5 @@ RSpec.describe TomTom::Batch do - let(:tomtom) { TomTom::Batch.new } + let(:batch) { TomTom::Batch.new(nil) } describe "#convert_way_costs_for_batch" do it "turns WayCost points into a collection of colon-separated strings" do @@ -15,7 +15,7 @@ RSpec.describe TomTom::Batch do ] expect( - tomtom.convert_way_costs_for_batch(way_costs) + batch.convert_way_costs_for_batch(way_costs) ).to eq([ '2,48:3,46', '-71,42:-71.5,42.9' -- cgit v1.2.3