Hi.
People start argue that my choice of names are not good. For now Mocketry use "should got" to verify that following message was occurred:
This is broken for native english speakers. Do you agree to replace it with correct #haveReceived? Can we use more short version #haveGot?
Also there is new expression to verify how object was received during test:
Should it be #haveReturnedFrom: ?
I hope we can make consensus and be happy with Mocketry. Best regards, Denis |
Why do we need those sophisticated past-something form after should at all? Why not simply mock should receive someMessage ? -- Best regards, Dennis Schetinin 2016-04-20 11:35 GMT+03:00 Denis Kudriashov <[hidden email]>:
|
2016-04-20 13:59 GMT+02:00 Dennis Schetinin <[hidden email]>:
Maybe. What others think? |
+1. this is easy and simple for any native / non native english .. Mocketry is really nice btw.. On Wed, Apr 20, 2016 at 7:45 AM, Denis Kudriashov <[hidden email]> wrote:
|
result should return: [mock someMessage] On Wed, Apr 20, 2016 at 1:35 PM, S Krish <[hidden email]> wrote:
|
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:
|
Administrator
|
In reply to this post by Denis Kudriashov
No ;) The minimum to not sound terrible would be #haveGotten This one seems less crucial. #have... would technically be correct since you made the others in the past tense, but as other commenters have pointed out, it would simplify things to keep everything in the present tense. Although there would then be the mismatch with the fact that the things did in fact already happen (hopefully) in the past!
Cheers,
Sean |
In reply to this post by Denis Kudriashov
... 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 <[hidden email]> wrote:
|
2016-04-27 0:33 GMT+02:00 Carlos Lombardi <[hidden email]>:
It's nice.I think "The" can be omitted:
But anyway I use word #return because there are different types of result: value return and error signal. There is no expression for last case but it would be like:
|
Hi again, ok, just to have coherence between the names for the two possible outcomes of a method, you could use #beReturnedBy instead of #beReturnedFrom: . You would have #beReturnedBy: and #beRaisedBy: On Wed, Apr 27, 2016 at 10:00 AM, Denis Kudriashov <[hidden email]> wrote:
|
So at the end of week I will rename "should got" into "should receive" 2016-04-27 23:39 GMT+02:00 Carlos Lombardi <[hidden email]>:
|
And done. Version 3.4 deprecates "should got" and introduces "should receive". All docs are updated. 2016-05-18 11:59 GMT+02:00 Denis Kudriashov <[hidden email]>:
|
Yuppee! Thanks :)
Doru > On May 23, 2016, at 12:18 PM, Denis Kudriashov <[hidden email]> wrote: > > And done. Version 3.4 deprecates "should got" and introduces "should receive". > All docs are updated. > > Prebuilt PDF can found here https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/107/artifact/book-result/Mocketry/Mocketry.pdf > > 2016-05-18 11:59 GMT+02:00 Denis Kudriashov <[hidden email]>: > So at the end of week I will rename "should got" into "should receive" > > 2016-04-27 23:39 GMT+02:00 Carlos Lombardi <[hidden email]>: > Hi again, > > ok, just to have coherence between the names for the two possible outcomes of a method, you could use #beReturnedBy instead of #beReturnedFrom: . You would have #beReturnedBy: and #beRaisedBy: > > On Wed, Apr 27, 2016 at 10:00 AM, Denis Kudriashov <[hidden email]> wrote: > > 2016-04-27 0:33 GMT+02:00 Carlos Lombardi <[hidden email]>: > ... maybe > > #result should beTheResultOf: [mock someMessage]. > #result should not beTheResultOf: [mock anotherMessage]. > > It's nice.I think "The" can be omitted: > > #result should beResultOf: [mock someMessage]. > > But anyway I use word #return because there are different types of result: value return and error signal. There is no expression for last case but it would be like: > > anError should beRaisedBy: [mock someMessage] > > > -- www.tudorgirba.com www.feenk.com "Speaking louder won't make the point worthier." |
Free forum by Nabble | Edit this page |