From: David Masover Date: 2009-04-23T07:16:46+09:00 Subject: Re: [Mocha] expects.at_least_once VS stubs On Saturday 18 April 2009 14:57:48 Fernando Perez wrote: > Hi, > > In a Rails app, I often find myself having to write > expects(:whatever).at_least_once.returns("some_value"), so it clutters > my test and I simply ditch expects() in favor of stubs() which won't > yell at me because some method was called more than once. I tend to prefer at_least_once if that's what I want, because then it will fail if the method isn't called at all -- stubs doesn't care how many times the method is called, or even if it's ever called.