... maybe

#result should beTheResultOf: [mock someMessage].
#result should not beTheResultOf: [mock anotherMessage].

Cordially - Carlos

On Wed, Apr 20, 2016 at 9:22 PM, Denis Kudriashov <dionisi...@gmail.com>
wrote:

>
> 2016-04-20 20:36 GMT+02:00 S Krish <krishnamachari.sudha...@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]
>
>
>

Reply via email to