perhaps verbose but how about
foo.should equal_in_any_order [1, 3, 1, 4, 2]
On Aug 6, 2008, at 1:50 PM, Pat Maddox wrote:
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).
Pat
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users