RSpec::Matchers.define :be_naturally_sorted do
match do |array|
array == array.natural_sort
end
end
See RSpec: Where to put custom matchers and other support code. To use natural_sort
, see this card.
This matcher is now part of Spreewald Show archive.org snapshot .
Posted by Dominik Schöler to makandra dev (2014-12-19 16:22)