[mocha-developer] Insure a method is called with no arguments.
jamesmead44 at gmail.com
Thu Oct 25 17:21:08 EDT 2007
On 25/10/2007, Duncan Beevers <duncanbeevers at gmail.com> wrote:
> We've been working with the ParameterMatchers (so cool!) but I don't
> see a way to insure a method is called with no arguments.
> I imagined something like:
> user = mock('User')
> Anyone run into this?
> mocha-developer mailing list
> mocha-developer at rubyforge.org
I'm glad you're finding the ParameterMatchers useful. You should be able to
do what you want by using with() with no parameters.
Let me know if that doesn't work.
In any case I quite like the nothing matcher idea, so I might add it as a
more expressive alternative.
More information about the mocha-developer