Sha256: 1aff5fbf9ca82a4255cac31654c70c4b9c89ac414df2b53ca693a2ff275e6784
Contents?: true
Size: 592 Bytes
Versions: 5
Compression:
Stored size: 592 Bytes
Contents
# frozen_string_literal: true require "spec_helper" module Roadie describe Deduplicator do it "removes identical pairs, keeping the last one" do input = [ ["a", "1"], ["b", "2"], ["a", "3"], ["a", "1"] ] expect(Deduplicator.apply(input)).to eq [ ["b", "2"], ["a", "3"], ["a", "1"] ] end it "returns input when no duplicates are present" do input = [ ["a", "1"], ["a", "3"], ["a", "2"] ] expect(Deduplicator.apply(input)).to eq input end end end
Version data entries
5 entries across 5 versions & 1 rubygems