Unencumbered V0.1.2: Write Cucumber step definitions in D

Jacob Carlborg via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sat Apr 26 00:54:16 PDT 2014


On Friday, 25 April 2014 at 08:45:20 UTC, Atila Neves wrote:

> Ehm... because until now I didn't know that @Given("foo") was 
> possible. In my head I was doing compile-time stuff so 
> everything had to be compile-time, if that makes any sense.
>
> After I read the above I wasn't even sure how @Given("foo") 
> would work so I wrote some code and now know that all I need is 
> a struct with a regular string field. I think the documenation 
> on http://dlang.org/attribute.html is severely lacking.

BTW, I think it's possible to use a plain function as well, which 
returns a struct. In this case, "Given" would be the function.

--
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list