[Pharo-dev] Mocketry names again
carlombardi at gmail.com
Tue Apr 26 18:33:34 EDT 2016
#result should beTheResultOf: [mock someMessage].
#result should not beTheResultOf: [mock anotherMessage].
Cordially - Carlos
On Wed, Apr 20, 2016 at 9:22 PM, Denis Kudriashov <dionisiydk at gmail.com>
> 2016-04-20 20:36 GMT+02:00 S Krish <krishnamachari.sudhakar at gmail.com>:
>> result should return: [mock someMessage]
> It should verify that result was returned from message defined inside
> block. That's why I use "should beReturnedFrom: [mock someMessage]".
> Following test demonstrates idea:
> mock := Mock new.
> mock stub someMessage willReturn: #result.
> mock stub anotherMessage willReturn: #anotherResult.
> mock someMessage should be: #result.
> mock anotherMessage should be: #anotherResult.
> #result should beReturnedFrom: [mock someMessage].
> #result should not beReturnedFrom: [mock anotherMessage]
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-dev