Sha256: 2782431b24feece5d9940d1869a6c17fa981cd525a2884ff7f6845e6aa233296

Contents?: true

Size: 410 Bytes

Versions: 2

Compression:

Stored size: 410 Bytes

Contents

require 'spec_helper'

describe 'Proximity Hash' do

  it 'calculates expected geohashes in distance order' do

    ph = ProximityHash.new(12.0, 77.0, 20.0, 8)
    hashes = ph.calculate

    expected = [
      'tdnu20tc', 'tdnu20t9',
      'tdnu20tb', 'tdnu20t8',
      'tdnu20tf', 'tdnu20td',
      'tdnu20mz', 'tdnu20mx',
      'tdnu20t3', 'tdnu20t2'
    ]

    expect(hashes.keys).to eq(expected)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
proximityhash-0.1.0 spec/proximityhash_spec.rb
proximityhash-0.0.0 spec/proximityhash_spec.rb