-mgvnf mk.  /
On Jul 9, 2013 11:49 AM, "Max Leske" <[email protected]> wrote:
>
>
> On 09.07.2013, at 17:42, Clément Bera <[email protected]> wrote:
>
>> They may be useful. Imagine you are too lazy to create a subclass of
Error, but not lazy enough to create a test and copy paste a String.
>> Then you write in your method:
>> self error: 'some strange error happened'
>> And you can test it:
>> self shouldnt: [ "some strange code" ] raise:
Error whoseDescriptionIncludes: 'some strange error happened' description:
'the strange error did not happen ! That's strange'
>>
>> Seriously, as you saw these methods are used only in their tests. I
guess you can remove them. Open fogz bug ?
>
>
> +1
>
>>
>>
>> 2013/7/9 Frank Shearar <[email protected]>
>>>
>>> On 9 July 2013 16:24, Camillo Bruni <[email protected]> wrote:
>>> > Survey: who uses the following methods? and if yes why?
>>> >
>>> > - shouldnt: aBlock raise: anExceptionalEvent
whoseDescriptionDoesNotInclude: subString.- description: aString
>>> > - shouldnt: aBlock raise: anExceptionalEvdcdvent
whoseDescriptionIncludes:       subString description: aString
>>> >
>>> > I honestly cannot wrap my head around these two methods.
>>>
>>> They show that the code in the block raises an _informative_
>>> exception. So you get a FileNotFound exception... but what was the
>>> missing file? I don't know! Noone bothered to mention it!
>>>
>>> frank
>>>
>>
>

Reply via email to