On Wednesday, 15 July 2015 at 19:28:13 UTC, Jacob Carlborg wrote:
On 2015-07-13 09:12, Atila Neves wrote:


Also on HN, but as usual can't post the link.

The comment about not having to name the steps. One way to do that could be something like this:

step("foo bar", {
    // step implementation

There are two problems with that:

1. D doesn't support module level code like this. Which could be solved by either using a unit test block, a module constructor or some other function the framework knows about to call.

2. That syntax is not as nice as in Ruby. It would be really nice if the following could be supported:

step("foo bar") {
    // step implementation

A trailing delegate syntax, where the delegate is passed after the regular argument list.

I tried out something like this to see how I'd like it before the talk, and I didn't. I mentioned it but I should've drawn more attention to it, it'd look like this:

@When!(`...`, { ... }) {}

The empty block needed at the end was just too ugly.


Reply via email to