ruby on rails - What Mocha API call will stub a method which takes no arguments? -


i seem find posts asking how assert method has no return value want require method call in tests never see arguments passed method.

i expected find documentation in http://gofreerange.com/mocha/docs/mocha/parametermatchers.html, no luck ... should looking elsewhere?

the documentation with method doesn't appear this, discovered calling with() no parameters force mocha check method call happens no arguments.

example:

myclass.any_instance.stubs(:its_method).with.return true 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -