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:
@user_notifier.expects(:deliver_activation).never

If you’re using flexmock, you can say:
flexmock(@user_observer).should_receive(:deliver_activation).never

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.

Advertisements

Pages

Categories

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