Skip to content

Commit 2e0041b

Browse files
committed
Ran luacov and found that there was one untested line; added test
1 parent 24b1101 commit 2e0041b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spec/mock_spec.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,15 @@ describe('The mock library', function()
258258
end)
259259
end)
260260

261+
it('should allow after to be used as an alias for when', function()
262+
local f = mock:mockFunction()
263+
264+
mock(f):shouldBeCalled():
265+
after(function()
266+
f()
267+
end)
268+
end)
269+
261270
it('should fail if a function is called too many times', function()
262271
shouldFail(function()
263272
local f = mock:mockFunction('f')

0 commit comments

Comments
 (0)