Re: [Pharo-users] Mocketry: what is used of #where ?

2018-05-04 Thread Herbert Vojčík
Herbert Vojčík wrote: Denis Kudriashov wrote: Hi Herbert. It is a bit experimental API to allow more descriptive failures. Evaluate following code: (2@3) where x should equal: 10 It will give you failure message: Got "2" from (2@3) x but it should equal "10". But without #where

Re: [Pharo-users] Mocketry: what is used of #where ?

2018-05-04 Thread Herbert Vojčík
Denis Kudriashov wrote: Hi Herbert. It is a bit experimental API to allow more descriptive failures. Evaluate following code: (2@3) where x should equal: 10 It will give you failure message: Got "2" from (2@3) x but it should equal "10". But without #where it would be: Got "2" but

Re: [Pharo-users] Mocketry: what is used of #where ?

2018-05-04 Thread Sean P. DeNigris
Denis Kudriashov wrote > It will give you failure message: Got "2" from (2@3) x but it should equal > "10". > But without #where it would be: Got "2" but it should equal "10". Wow, that sounds really cool. I'll have to play with it a bit to see how much difference it makes in practice… -

Re: [Pharo-users] Mocketry: what is used of #where ?

2018-05-04 Thread Denis Kudriashov
Hi Herbert. It is a bit experimental API to allow more descriptive failures. Evaluate following code: (2@3) where x should equal: 10 It will give you failure message: Got "2" from (2@3) x but it should equal "10". But without #where it would be: Got "2" but it should equal "10". And it works

[Pharo-users] Mocketry: what is used of #where ?

2018-05-04 Thread Herbert Vojčík
Hello, When I am writing tests using Mocketry's DSL, I get puzzled about how / when to use #where, and how is it different when it's used and when it is not? As far as i tried, I did not find any difference. That is, pasting part of one of my tests: response := znClient