1 | require('lazy-ass');
|
2 | var describeIt = require('..');
|
3 | var sourceName = __dirname + '/variable-foo';
|
4 |
|
5 | describeIt(sourceName, 'var foo', function (getFoo) {
|
6 | it('has value "foo"', function () {
|
7 | la(getFoo() === 'foo');
|
8 | });
|
9 | });
|
10 |
|
11 | var useBeforeEach = true;
|
12 | describeIt(sourceName, 'var foo', useBeforeEach, function (getFoo) {
|
13 | it('has value "foo"', function () {
|
14 | la(getFoo() === 'foo');
|
15 | });
|
16 |
|
17 | it('has value "foo" second time', function () {
|
18 | la(getFoo() === 'foo');
|
19 | });
|
20 | });
|
21 |
|
22 | describe('automatic assign', function () {
|
23 | describeIt(sourceName, 'var foo', function () {
|
24 | it('has value "foo"', function () {
|
25 | la(this.foo === 'foo');
|
26 | });
|
27 | });
|
28 | });
|