[Pharo-dev] Unifying Testing Ideas

Attila Magyar m.magyar3 at gmail.com
Tue Dec 3 14:42:51 EST 2013

Sean P. DeNigris wrote
> In fact, #does: and #answers: could easily be merged, using double
> dispatch to pass either a block or a value.

It's true, but it would make difficult to return a block. E.g.

    mock can receive: #msg; answers: [ [..] ]

Sean P. DeNigris wrote
> Unrelatedly, it would be slightly clearer to rename "anything" to
> "anyMessage". "anything" makes it seem like it could be passed as an
> argument, which doesn't work. Or alternately, you could probably rename
> AnyMessage to Anything and combine its API with that of AnyArgument if
> they don't clash...

I agree, I'll try to combine them first, but anyMessage/anyArgument seems
fine too.

Anyways, I'm working on the next version with a slightly different api. My
plan is to fully separate the DSL from the main part. This will make
possible to play with different syntax without touching the core. Or even
the users will be able to define their own syntax.

View this message in context: http://forum.world.st/Unifying-Testing-Ideas-tp4726787p4727144.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.

More information about the Pharo-dev mailing list