On 9 July 2013 22:45, Nicolas Cellier
<nicolas.cellier.aka.nice@gmail.com> wrote:"should not raise an exceptional event whose description does not include"wow, who is crooked enough to use double negation ;)
is it a convenience method for following:
[ self dosomething ] on: Error do: [:ex |
self assert: ex message includes:'whatever' ]
?
as to me this is more readable and intent-revealing than using strange
double-negation..
Nicolas2013/7/9 St�phane Ducasse <stephane.ducasse@inria.fr>So + 1 :)- shouldnt: aBlock raise: anExceptionalEventwhoseDescriptionDoesNotInclude: subString description: aString- shouldnt: aBlock raise: anExceptionalEvent whoseDescriptionIncludes:subString description: aStringI 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 themissing file? I don't know! Noone bothered to mention it!no it is #shouldnt: it is the inverse.the #should:... handler methods are fine, but these specific two methodsare just insane.I tried to reimplement them without looking at the original definitionand I cannot come up with something that matches the name :) so there isdefinitely something wrong with it.
--
Best regards,
Igor Stasenko.