Sha256: acf9062a4d4649c71381f8c6b39395d05b37417aa0061c9e37d1568e34331809

Contents?: true

Size: 490 Bytes

Versions: 1

Compression:

Stored size: 490 Bytes

Contents

require 'spec_helper'

describe "GeoDistance::Spherical" do
  it "should work" do
    lon1 = -104.88544
    lat1 = 39.06546

    lon2 = -104.80
    lat2 = lat1

    dist = GeoDistance::Spherical.distance( lat1, lon1, lat2, lon2 )

    puts "the distance from  #{lat1}, #{lon1} to #{lat2}, #{lon2} is: #{dist[:meters].number} meters"

    puts "#{dist[:feet]}"
    puts "#{dist.meters}"
    puts "#{dist[:km]}"
    puts "#{dist[:miles]}"
    dist[:km].to_s.should match(/7\.376*/)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
geo-distance-0.1.2 spec/dist_spherical_spec.rb