Posts Tagged 'style ruby test should'

More on Should

I was reading a post to Rails Studio mailing list today when I came across this:

If you’re using mocha/stubba, you can say:

If you’re using flexmock, you can say:

Which would I rather use? Disregarding the frameworks, if you read my previous post, you know the answer: use the active verb! expects is far preferable to should_receive.



Copyright ©2008-2013 James E Orchard-Hays, All Rights Reserved