[rspec-users] Someone please name this matcher for me

Pat Maddox pergesu at gmail.com
Wed Aug 6 13:50:27 EDT 2008

I've had a matcher in my head for a couple months, that I frequently
want but never get around to writing because I can't think of the name
for it.  Here's how it would look

[1, 2, 3, 4, 1].should ... [1, 3, 1, 4, 2]

I have a couple ideas for names, but I'll hold off on them so I don't
influence anyone's opinion.

btw, I realize that .sort works in this case.  But that's slightly
less clear than I'd like, and it doesn't work for non-Comparable
objects (like activerecords).


More information about the rspec-users mailing list