Sha256: a1bc6b81c20c69f6e5cf2a70bd932f8c5757ad76f1049b1bff13b2dbcf9c3254

Contents?: true

Size: 508 Bytes

Versions: 5

Compression:

Stored size: 508 Bytes

Contents

require 'spec_helper'

# - www.movable-type.co.uk/scripts/latlong.html
describe Array do
  # deg, format, dp
  describe '#to_dms' do
    let (:dms_arr) { [58.3, 4].to_dms }

    it 'should convert [58.3, 4] to string of dms format' do
      dms_arr.should match /58.*18.*, 04.*00/
    end
  end

  describe '#to_dms :reverse' do
    let (:dms_arr) { [58.3, 4].to_dms :lat_lng}

    it 'should convert [58.3, 4] to string of dms format' do
      dms_arr.should match /04.*00.*N, 058.*18.*E/
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
geo_units-0.3.4 spec/geo_units/numeric_spec.rb
geo_units-0.3.3 spec/geo_units/numeric_spec.rb
geo_units-0.3.2 spec/geo_units/numeric_spec.rb
geo_units-0.3.1.1 spec/geo_units/numeric_spec.rb
geo_units-0.3.1 spec/geo_units/numeric_spec.rb