[mocha-developer] Parameter Matchers with optional params

Andrew Vit andrew at avit.ca
Sun Sep 23 20:18:43 EDT 2007


Hi,

Are there any docs for combining parameter matchers, or some way to  
define optional parameters? I'm trying to match something like:

   .find( 42 )  ||  .find( 42, {:conditions=>nil,:includes=>nil} )

Or for that matter, 42 followed by nothing or anything... Halp? I've  
tried different nested combos with any_of/all_of/anything, but  
getting lost trying.

--Andrew Vit


More information about the mocha-developer mailing list