[Pharo-dev] [Ann] New version of Mocketry 3.0
dionisiydk at gmail.com
Wed Apr 6 08:29:54 EDT 2016
I am glad to present simplest mocks for Pharo.
In this version Mocketry is dramatically improved and changed. I try to
provide most simple way to stub any message to any object and to verify any
You can read full details in my blog
Here is short example:
mock := Mock new.
mock *stub* someMessage *willReturn:* 1000.
mock someMessage should be: 1000.
mock *should got* someMessage.
mock *should not* *got* anotherMessage.
rect := 0 at 0 corner: 2 at 3.
rect *stub* width willReturn: 1000.
rect area should be: 3000 "area = width * height".
rect *should got* width.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-dev