On 2013-10-22, at 00:20, Alexandre Bergel <[email protected]> wrote:

> Instead of using shouldnt:raise:, you can simply remove the assertion, as in:
> 
> -=-=-=-=-=-=-=-=-=
> testNoErrorWhenDrawing
>       self shouldnt: [ view raw drawOn: tracingCanvas ] raise: Error
> -=-=-=-=-=-=-=-=-=
> 
> ||
> V
> 
> -=-=-=-=-=-=-=-=-=
> testNoErrorWhenDrawing
>       view raw drawOn: tracingCanvas
> -=-=-=-=-=-=-=-=-=
> 
> With the second version of the test, the test may be listed as an error in 
> case of an exception, whereas the first version it can only be listed as a 
> failure.

Right, but that doesn't make any difference IMO, using `shouldnt: [...] raise: 
Error` to not have errors
does not make much sense. It makes a little bit more sense when using a 
specific Error, and it
makes sense when testing for Notifications, which would go otherwise unnoticed.

Which is the reason that `#shouldnt:raise:` no longer accepts `Error` as an 
argument, but still lets
you use anything else.

> I read your post and I kind of agree.
> I will fix my tests then.

nice :)

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to