Merge pull request #1860 from chef/ap/contain_duplicates_deprecation

Commenting the `contain_duplicates` deprecation until we have a good alternative
This commit is contained in:
Adam Leff 2017-06-06 08:05:09 -04:00 committed by GitHub
commit 587cdf5bee

View file

@ -88,7 +88,6 @@ end
RSpec::Matchers.define :contain_duplicates do
match do |arr|
warn '[DEPRECATION] `contain_duplicates` is deprecated and will be removed in the next major version. See https://github.com/chef/inspec/issues/738 for more details'
dup = arr.select { |element| arr.count(element) > 1 }
!dup.uniq.empty?
end