Sha256: e66396c87c0f1642f261da555a5e63d086a1b753f656a7f62987044417afa37a

Contents?: true

Size: 501 Bytes

Versions: 5

Compression:

Stored size: 501 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

5 entries across 5 versions & 1 rubygems

Version Path
zipcoder-0.7.2 spec/array_spec.rb
zipcoder-0.7.1 spec/array_spec.rb
zipcoder-0.7.0 spec/array_spec.rb
zipcoder-0.6.1 spec/array_spec.rb
zipcoder-0.6.0 spec/array_spec.rb