about should:raise: and should:raise:description
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
On 27 Jul 2015, at 00:15, Nicolai Hess <nicolaihess@web.de> 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
Am 27.07.2015 um 00:15 schrieb Nicolai Hess <nicolaihess@web.de>:
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
2015-07-27 8:21 GMT+02:00 Norbert Hartl <norbert@hartl.name>:
Am 27.07.2015 um 00:15 schrieb Nicolai Hess <nicolaihess@web.de>:
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
participants (3)
-
Nicolai Hess -
Norbert Hartl -
Sven Van Caekenberghe