legacy2luatest: Use before_each instead of setup.
This will avoid confusion if additional `it()` blocks are added. (`setup()` only runs once per `describe()` block, whereas `before_each()` runs before each `it()`).
This commit is contained in:
parent
63a12e1e2d
commit
815ba27f75
|
@ -287,7 +287,7 @@ local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
||||||
|
|
||||||
describe('$test_name', function()
|
describe('$test_name', function()
|
||||||
setup(clear)
|
before_each(clear)
|
||||||
|
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
@{[join "\n", map { /^$/ ? '' : ' ' . $_ } @{$test_body_lines}]}
|
@{[join "\n", map { /^$/ ? '' : ' ' . $_ } @{$test_body_lines}]}
|
||||||
|
|
Loading…
Reference in New Issue