Sha256: a40aa29a1c6b6a260b2c8dc4f558151ffd072187b602dadede7c8765e9828f19
Contents?: true
Size: 524 Bytes
Versions: 1
Compression:
Stored size: 524 Bytes
Contents
require 'spec_helper' describe "GeoDistance default" do it "should work" do lon1 = -104.88544 lat1 = 39.06546 lon2 = -104.80 lat2 = lat1 GeoDistance.default_algorithm = :haversine dist = GeoDistance.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_default_spec.rb |