1 | var assert = require('assert');
|
2 | var debug = require('debug')('dialect:example');
|
3 |
|
4 | module.exports = function(learn, config) {
|
5 |
|
6 | learn.given(["I am an example"], function(done) {
|
7 | assert(this.example, "Not an example - use @example before feature")
|
8 | debug("You are an ApiGeek !!")
|
9 | log("We are ApiGeeks !!")
|
10 | done && done();
|
11 | });
|
12 |
|
13 | debug("understands I am an example");
|
14 |
|
15 | return {
|
16 | annotations: function(dialect, annotations, scope, actor) {
|
17 | if (annotations.example) {
|
18 | scope.example = true;
|
19 | debug("An Example"+(actor&&actor.title?": "+actor.title:scope.name || ""));
|
20 | }
|
21 | }
|
22 | }
|
23 | }
|
24 |
|