[mocha-developer] Expecting calls with two different parameters
Bryan Helmkamp
bhelmkamp at gmail.com
Fri Oct 6 18:20:53 EDT 2006
Hello,
I've just started using Mocha in the tests for my Rails app, and I've
run across an issue with mocking a method that should be called with
different parameters.
How would I setup a mock that expects that a method will be called
once with no paramaters, and a second time with a parameter? I'd be
tempted to shortcut and just do something like
foo.expects(:bar).times(2), but the value used as the parameter when
calling it the second time is very important.
Thoughts?
-Bryan
--
http://www.MyCongress.org/ -- coming soon
More information about the mocha-developer
mailing list