File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ local Mock = {}
2
2
3
3
local subscriber
4
4
5
- function mockHandle (callback , thunk )
5
+ function handleMockCalls (callback , thunk )
6
6
subscriber = callback
7
7
thunk ()
8
8
subscriber = nil
@@ -121,7 +121,7 @@ function MockExpectation:when(thunk)
121
121
end
122
122
end
123
123
124
- mockHandle (called , thunk )
124
+ handleMockCalls (called , thunk )
125
125
126
126
for _ , call in pairs (self ._calls ) do
127
127
if call :isRequired () then
@@ -227,7 +227,7 @@ function Mock:mockMethod(name)
227
227
return m
228
228
end
229
229
230
- function IsCallable (x )
230
+ function isCallable (x )
231
231
local isFunction = type (x ) == ' function'
232
232
local hasCallMetamethod = type ((debug.getmetatable (x ) or {}).__call ) == ' function'
233
233
return isFunction or hasCallMetamethod
@@ -238,7 +238,7 @@ function Mock:mockTable(t, name)
238
238
local mocked = {}
239
239
240
240
for k , v in pairs (t ) do
241
- if IsCallable (v ) then
241
+ if isCallable (v ) then
242
242
mocked [k ] = self :mockFunction (name .. ' .' .. tostring (k ))
243
243
end
244
244
end
@@ -251,7 +251,7 @@ function Mock:mockObject(o, name)
251
251
local mocked = {}
252
252
253
253
for k , v in pairs (o ) do
254
- if IsCallable (v ) then
254
+ if isCallable (v ) then
255
255
mocked [k ] = self :mockMethod (name .. ' :' .. tostring (k ))
256
256
end
257
257
end
You can’t perform that action at this time.
0 commit comments