Sha256: e37db1847361d1a376594c88502fbfb66f2503d9e7b5c88b7e4ce30d6f0ee9fc
Contents?: true
Size: 564 Bytes
Versions: 8
Compression:
Stored size: 564 Bytes
Contents
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
8 entries across 8 versions & 1 rubygems