2014-05-02 10:16 GMT+02:00 Henrik Johansen <[email protected]>:

>
> On 01 May 2014, at 12:52 , Nicolas Cellier <
> [email protected]> wrote:
>
> > Hi,
> > I see many usage of #should: in SciSmalltalk tests that could simply be
> turned into #assert: or eventually #assert:equals:
> > Why wanting to use a block?
> > Other than #should:raise: and #shouldnt:raise:, I don't really see the
> point of #should: alone anyway...
> > IMO should: should be deprecated, less is more.
> > I'm possibly the author of several of these #should: sends, so don't
> take it personnally ;)
> >
> > P.S. or is it easier to restart the block in the Debugger?
> > I cross post to pharo-dev because it's a generic question, and there are
> a few #should: sends in Pharo-3.0 too.
>
> Reading code with should:, I always imagined a trailing question mark...
>
> self should: [IHaveIceCreamForLunch] ?
>
> And even more so with should:raise:
>
> self should [thisPieceOfCode] raise: SomeError ?
>
> I dunno, you tell me!
>
> The potentially constructive suggestion out of that, is that, at least to
> me,
> assert:raises: deny:raises: sound more natural than assert:raise: when
> read out loud.
>
>
I see, an affirmative form could be:
[thisPieceOfCode] shouldRaise: SomeError

but we need to insert the testimony of SUnit...
assert:raises: is exactly that, and makes sense


> Cheers,
> Henry
>

Reply via email to