Skip to content

Commit 19922bd

Browse files
committed
Document multiple_times modifier. Closes #23.
1 parent 8f9299a commit 19922bd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,19 @@ f:should_be_called():and_will_raise_error('some error'):when(function()
9191
end)
9292
```
9393

94+
## Multiple Calls to the Same Function
95+
96+
```lua
97+
local mach = require 'mach'
98+
99+
local f = mach.mock_function('f')
100+
101+
f:should_be_called():multiple_times(2):when(function()
102+
f()
103+
f()
104+
end)
105+
```
106+
94107
## Multiple Expectations
95108

96109
```lua

0 commit comments

Comments
 (0)