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

2008-08-08 Thread Mark Wilden
is_permutation_of would be technically correct, but it doesn't really express equality to me, which is the intent of the match. ///ark ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

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

2008-08-08 Thread Dhruv Bansal
i wrote this matcher myself for a project i'm working on and have been calling it `equals_without_regard_to_order'. it's an unwieldy name and i've never really been comfortable with it but i've continued to use it, mostly because i'm dim. very curious to find a winning replacement on this list!

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

2008-08-08 Thread Jay Levitt
Zach Dennis wrote: [1, 2, 3, 4, 1].should consist_of([1, 3, 1, 4, 2]) +1 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

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

2008-08-07 Thread Kyle Hargraves
On Wed, Aug 6, 2008 at 1:25 PM, Cohen, Joseph [EMAIL PROTECTED] wrote: Consider: should_have_the_same_members_as Similarly, I have a have_same_elements_as(arr) matcher. k ___ rspec-users mailing list rspec-users@rubyforge.org

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

2008-08-07 Thread Cohen, Joseph
] On Behalf Of Kyle Hargraves Sent: Thursday, August 07, 2008 8:17 AM To: rspec-users Subject: Re: [rspec-users] Someone please name this matcher for me On Wed, Aug 6, 2008 at 1:25 PM, Cohen, Joseph [EMAIL PROTECTED] wrote: Consider: should_have_the_same_members_as Similarly, I have

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

2008-08-06 Thread Pat Maddox
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

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

2008-08-06 Thread Jonathan Linowes
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

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

2008-08-06 Thread Mike Vincent
On Wed, Aug 6, 2008 at 12:50 PM, Pat Maddox [EMAIL PROTECTED] 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] [1, 2,

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

2008-08-06 Thread Zach Dennis
On Wed, Aug 6, 2008 at 1:50 PM, Pat Maddox [EMAIL PROTECTED] 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

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

2008-08-06 Thread Cohen, Joseph
Consider: should_have_the_same_members_as -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Zach Dennis Sent: Wednesday, August 06, 2008 11:15 AM To: rspec-users Subject: Re: [rspec-users] Someone please name this matcher for me On Wed, Aug 6, 2008 at 1

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

2008-08-06 Thread Steve Schafer
On Wed, 6 Aug 2008 13:50:27 -0400, you 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] An unordered collection with

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

2008-08-06 Thread Matt Wynne
How about [1, 2, 3, 4, 1].should contain([1, 3, 1, 4, 2]) [1, 2, 3, 4, 1].should contain_only([1, 3, 1, 4, 2]) or (riffing off Zach) [1, 2, 3, 4, 1].should be_composed_from([1, 3, 1, 4, 2]) Matt -- Posted via http://www.ruby-forum.com/. ___

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

2008-08-06 Thread Jonathan Linowes
.should be_bag_of( [1, 3, 1, 4, 2] ) On Aug 6, 2008, at 2:33 PM, Steve Schafer wrote: On Wed, 6 Aug 2008 13:50:27 -0400, you 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

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

2008-08-06 Thread Tero Tilus
2008-08-06 13:11, Mike Vincent: [1, 2, 3, 4, 1].should ... [1, 3, 1, 4, 2] [1, 2, 3, 4, 1].should include_all [1, 3, 1, 4, 2] I'd then think that [1, 1, 1, 2, 3, 4].should include_all [1, 3, 1, 4, 2] [1, 2, 3, 4, 5, 6].should include_all [1, 3, 1, 4, 2] Which afaik was not what Pat had

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

2008-08-06 Thread Alex Satrapa
On 07/08/2008, at 05:04 , Jonathan Linowes wrote: .should be_bag_of( [1, 3, 1, 4, 2] ) FWIW, I am in favour of this naming. Now back to lurking :) ___ rspec-users mailing list rspec-users@rubyforge.org