2009/10/29 George Herolyants <george.herolya...@gmail.com>

> 2009/10/29 Dennis Schetinin <chae...@gmail.com>:
> > For me it's not clear at all. But this is much more obvious:
> >
> >         stack := self resultOf: [self shouldBeEmpty].
> >
>
> So why to use a block then? And stop, why to use "resultOf:"???
>

For the same reason the execution of the test was being wrapped by original
#given: (maybe we have to ask author?)



> >> And by "declarative" I meant
> >> the way you specify dependencies between your tests. If it was done
> >> your way, test would be performed twice.
> >
> > Why?
>
> Don't you expect the block to be evaluated?
>
> >>
> >> If you use symbol, you don't
> >> have to do it (haven't seen the library yet, just guessing :).
> >
> > Don't have to do what?
>
> Don't have to execute method shouldBeEmpty twice.
>

Sorry, I don't understand. My variant was exactly the same as (unknown:)
original one but using explicit message send instead of hiding it by
selector passing. Including number of #shouldBeEmpty executions.


-- 

Dennis Schetinin
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to