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
Post a Comment