[rspec-users] array order-agnostic matching?

2011-02-01 Thread James OBrien
hey, thanks for reading: I have a problem which can be reduced to this, from within an example of mine I call the helper 'expect_call' which is defined thus: def expect_call(*hash*)* *obj.should_receive(:some_ method).with(*hash*)* *end and in one of my examples the 'expected' hash is

Re: [rspec-users] array order-agnostic matching?

2011-02-01 Thread James OBrien
much again - I have your book :) and although I'm new to it I really enjoy rspec! On Tue, Feb 1, 2011 at 8:51 AM, James OBrien ja...@rapleaf.com wrote: ooops, that sent itself early... . . . there are other entries in the hash so presumably I will need something like this foo.should_receive

Re: [rspec-users] array order-agnostic matching?

2011-02-01 Thread James OBrien
= :in_the_hash } actual.should =~ [1,2,3] end i.e. I assert :some_key and 'the rest' separately. There isn't a way to do this simpler is there? Thanks again David! On Tue, Feb 1, 2011 at 8:46 AM, James OBrien ja...@rapleaf.com wrote: Awesome, thanks David! there are other entries

Re: [rspec-users] array order-agnostic matching?

2011-02-01 Thread James OBrien
...@gmail.comwrote: On Feb 1, 2011, at 3:40 AM, James OBrien wrote: hey, thanks for reading: I have a problem which can be reduced to this, from within an example of mine I call the helper 'expect_call' which is defined thus: def expect_call(*hash*)* *obj.should_receive(:some_ method

Re: [rspec-users] array order-agnostic matching?

2011-02-01 Thread James OBrien
Plan and Documentation in source code with placeholders 3. Build Spec 4. Build Code An architecture that, when bootstrapped, tests itself to make sure it's not borked before the code runs. (ie it does self-check on startup, essentially). Julian. On 02/02/2011, at 2:36 PM, James OBrien wrote

Re: [rspec-users] array order-agnostic matching?

2011-02-01 Thread James OBrien
I agree Vincent Can people however please use this trail to help me with my original query. I repeat the private method is declared on the test example group. This is not inside implemenraton code. On Feb 1, 2011 9:21 PM, Wincent Colaiuta w...@wincent.com wrote: El 02/02/2011, a las 02:28,