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 @@ -24,11 +24,11 @@ function mach.mock_function(name)
24
24
name = name or ' <anonymous>'
25
25
local f = {}
26
26
27
- function fCall (_ , ...)
27
+ function f_call (_ , ...)
28
28
return mock_called (f , name , table.pack (... ))
29
29
end
30
30
31
- setmetatable (f , {__call = fCall })
31
+ setmetatable (f , {__call = f_call })
32
32
33
33
return f
34
34
end
@@ -47,7 +47,7 @@ function mach.mock_method(name)
47
47
return m
48
48
end
49
49
50
- function isCallable (x )
50
+ function is_callable (x )
51
51
local is_function = type (x ) == ' function'
52
52
local has_call_metamethod = type ((debug.getmetatable (x ) or {}).__call ) == ' function'
53
53
return is_function or has_call_metamethod
@@ -58,7 +58,7 @@ function mach.mock_table(t, name)
58
58
local mocked = {}
59
59
60
60
for k , v in pairs (t ) do
61
- if isCallable (v ) then
61
+ if is_callable (v ) then
62
62
mocked [k ] = mach .mock_function (name .. ' .' .. tostring (k ))
63
63
end
64
64
end
@@ -71,7 +71,7 @@ function mach.mock_object(o, name)
71
71
local mocked = {}
72
72
73
73
for k , v in pairs (o ) do
74
- if isCallable (v ) then
74
+ if is_callable (v ) then
75
75
mocked [k ] = mach .mock_method (name .. ' :' .. tostring (k ))
76
76
end
77
77
end
You can’t perform that action at this time.
0 commit comments