Sha256: 99ddd408b859dd16be421a7e6ad81d434c99fe9d584660c381cbad6692c1b4ab

Contents?: true

Size: 519 Bytes

Versions: 10

Compression:

Stored size: 519 Bytes

Contents

require "spec_helper"
require "zipcoder/ext/array"


describe Array do
  it 'combines the zip codes' do
    [
        [["12345","12346","12347"], "12345-12347"],
        [["12347","12346","12345"], "12345-12347"],
        [["12346","12347","12345"], "12345-12347"],
        [["12346","12347","12345","78746"], "12345-12347,78746"],
        [["78748","78746","12346","12347","12345"], "12345-12347,78746,78748"],
        [[], ""],
    ].each do |test|
      expect(test[0].combine_zips).to eq(test[1])
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
zipcoder-0.9.2 spec/array_spec.rb
zipcoder-0.9.1 spec/array_spec.rb
zipcoder-0.9.0 spec/array_spec.rb
zipcoder-0.8.4 spec/array_spec.rb
zipcoder-0.8.3 spec/array_spec.rb
zipcoder-0.8.2 spec/array_spec.rb
zipcoder-0.8.1 spec/array_spec.rb
zipcoder-0.8.0 spec/array_spec.rb
zipcoder-0.7.4 spec/array_spec.rb
zipcoder-0.7.3 spec/array_spec.rb