On Sep 28, 2008, at 7:52 pm, David Chelimsky wrote:

What you're proposing could be resolved with an argument constraint
that's been discussed in some other threads on this list - something
like:

 lambda {...}.should change{...}.to(array_consisting_of(...))

I'd prefer this as it lets us keep the single matcher, but allows us
to make it more flexible by adding different constraints. We already
have hash_including. This would expand that sort of capability.

WDYT?



On the basis that my code isn't a Rails app*, but I'd still like this fix, I vote +1 for "array_consisting_of" (or something).

How about...
  lambda {...}.should change{...}.to(collection_equivalent_to(...))
?

Bit long winded but I think it expresses the intent? (Correct me if not...)

As for change vs change_contents_of, I vote for keeping the one matcher. I don't think I should be expected to know when an object that replies to ==([]) is not an array.

Or an H R Giger alien for that matter...

Cheers
Ashley



* Ironically in my attempt to escape Rails, I have, in the same day, both been bitten by an ORM that behaves like ActiveRecord, and a different gem that loads ActiveSupport and borks 'require' when I run my specs. =(

--
http://www.patchspace.co.uk/
http://aviewfromafar.net/

_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to