about should:raise: and should:raise:description

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

about should:raise: and should:raise:description

Nicolai Hess
from the usecase of

self should:[some operation] raise: AnException description: ' a Text'

I would expect that the test asserter would compare ' a Text' with the
description of the exception raised.
But it does not happen.
All this test cases succeed, even if the description is different from the
actual exception message.
Is this a bug or is the description text only used as a description
for failing tests?


nicolai
Reply | Threaded
Open this post in threaded view
|

Re: about should:raise: and should:raise:description

Sven Van Caekenberghe-2

> On 27 Jul 2015, at 00:15, Nicolai Hess <[hidden email]> wrote:
>
> from the usecase of
>
> self should:[some operation] raise: AnException description: ' a Text'
>
> I would expect that the test asserter would compare ' a Text' with the
> description of the exception raised.
> But it does not happen.
> All this test cases succeed, even if the description is different from the
> actual exception message.
> Is this a bug or is the description text only used as a description
> for failing tests?

I would guess the latter, from other 'description' use in assertions.

>
> nicolai


Reply | Threaded
Open this post in threaded view
|

Re: about should:raise: and should:raise:description

NorbertHartl
In reply to this post by Nicolai Hess


> Am 27.07.2015 um 00:15 schrieb Nicolai Hess <[hidden email]>:
>
> from the usecase of
>
> self should:[some operation] raise: AnException description: ' a Text'
>
> I would expect that the test asserter would compare ' a Text' with the
> description of the exception raised.
> But it does not happen.
> All this test cases succeed, even if the description is different from the
> actual exception message.
> Is this a bug or is the description text only used as a description
> for failing tests?

description is only displayed if a test fails. It is just to give more context to assertion that failed

Norbert
Reply | Threaded
Open this post in threaded view
|

Re: about should:raise: and should:raise:description

Nicolai Hess


2015-07-27 8:21 GMT+02:00 Norbert Hartl <[hidden email]>:


> Am 27.07.2015 um 00:15 schrieb Nicolai Hess <[hidden email]>:
>
> from the usecase of
>
> self should:[some operation] raise: AnException description: ' a Text'
>
> I would expect that the test asserter would compare ' a Text' with the
> description of the exception raised.
> But it does not happen.
> All this test cases succeed, even if the description is different from the
> actual exception message.
> Is this a bug or is the description text only used as a description
> for failing tests?

description is only displayed if a test fails. It is just to give more context to assertion that failed


Ok, that makes sense.

Thanks.

 
Norbert