Sha256: fe077678acaac0f8542499f37501af9c9c910c5ed2ed86fff7cc0b9bc660a7fc
Contents?: true
Size: 595 Bytes
Versions: 1
Compression:
Stored size: 595 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
roadie-4.0.0 | spec/lib/roadie/deduplicator_spec.rb |