[rspec-users] Applying an rspec matcher against the elements of a collection
ohthepete at gmail.com
Tue Feb 23 17:53:20 EST 2010
Pat, Thanks for the response.
On Feb 23, 1:43 pm, Pat Maddox <mailingli... at patmaddox.com> wrote:
> I'm going to argue that your design is off, and then ignore the rest of your post :)
Fair enough :) The 'design' in my example was made up on the spot to
try and illustrate the kind of issues I've been coming up against
without lots of irrelevant detail. I agree that the code has all sorts
of silly issues.
> Also, RSpec has two mechanisms for testing collections the way you want (so I guess I'm not ignoring your post after all).
Thanks for pointing me towards the include and =~ matchers. This was
part of what I was looking for, and would solve a lot of the issues
I've hit in the past.
That said, I still feel that it would be helpful to have some way of
applying a matcher against the elements of a collection. I will just
have to come up with a more plausible example... :)
More information about the rspec-users