Sha256: 5da5a821ccb754c4b39fb36fff807e9b6d37ee55547f3f2161b86c8b8b16c859

Contents?: true

Size: 884 Bytes

Versions: 1

Compression:

Stored size: 884 Bytes

Contents

require 'spec_helper'
require File.expand_path("../../lib/cartodb-importer/gpx", __FILE__)


describe CartoDB::GPX do
  it "should return the track point number in file" do
    gpx = CartoDB::GPX.new (File.expand_path("../support/data/route2.gpx", __FILE__))
    gpx.track_points.should == 822
  end
  it "should return the route point number in file" do
    gpx = CartoDB::GPX.new (File.expand_path("../support/data/route2.gpx", __FILE__))
    gpx.route_points.should == 0
  end

  it "should return the track point number in file whiout track_points" do
    gpx = CartoDB::GPX.new (File.expand_path("../support/data/ex.gpx", __FILE__))
    gpx.track_points.should == 0
  end

  it "should return the route point number in file whit only route points" do
    gpx = CartoDB::GPX.new (File.expand_path("../support/data/ex.gpx", __FILE__))
    gpx.route_points.should == 46
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cartodb-importer-0.2.19 spec/gpx_spec.rb