require 'spec_helper' describe Enumerable do it 'should find duplicates' do [0, 1, 2, 3].dups.should == [] [0, 3, 3, 2, 2].dups.should =~ [2, 3] %w{one two three two one one three four five}.dups.should =~ %w{one two three} end end