Sha256: 826f9fa39048d34109119160b831fc5547f5f9291aa31ea04a159b2f2ca3b44c

Contents?: true

Size: 682 Bytes

Versions: 9

Compression:

Stored size: 682 Bytes

Contents

require "pact_broker/versions/abbreviate_number"

module PactBroker
  module Versions
    describe AbbreviateNumber do
      describe "#call" do
        TEST_CASES = [
          ["202326572516dea6998a7f311fcaa161c0768fc2", "2023265"],
          ["1.2.3+areallyreallyreallylongexplanation", "1.2.3+areallyreallyreallylongexplanation"],
          ["2516dea6998a7f", "2516dea6998a7f"],
          ["1.2.3+202326572516dea6998a7f311fcaa161c0768fc2", "1.2.3+2023265"]
        ]

        TEST_CASES.each do |(input, output)|
          it "shortens #{input} to #{output}" do
            expect(AbbreviateNumber.call(input)).to eq output
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pact_broker-2.87.0 spec/lib/pact_broker/versions/abbreviate_number_spec.rb
pact_broker-2.86.0 spec/lib/pact_broker/versions/abbreviate_number_spec.rb
pact_broker-2.85.1 spec/lib/pact_broker/versions/abbreviate_number_spec.rb
pact_broker-2.85.0 spec/lib/pact_broker/versions/abbreviate_number_spec.rb
pact_broker-2.84.0 spec/lib/pact_broker/versions/abbreviate_number_spec.rb
pact_broker-2.83.0 spec/lib/pact_broker/versions/abbreviate_number_spec.rb
pact_broker-2.82.0 spec/lib/pact_broker/versions/abbreviate_number_spec.rb
pact_broker-2.81.0 spec/lib/pact_broker/versions/abbreviate_number_spec.rb
pact_broker-2.80.0 spec/lib/pact_broker/versions/abbreviate_number_spec.rb