Skip to content

Commit 3592d8a

Browse files
committed
updated function names for consistency
1 parent 5987f64 commit 3592d8a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/mach.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ function mach.mock_function(name)
2424
name = name or '<anonymous>'
2525
local f = {}
2626

27-
function fCall(_, ...)
27+
function f_call(_, ...)
2828
return mock_called(f, name, table.pack(...))
2929
end
3030

31-
setmetatable(f, {__call = fCall})
31+
setmetatable(f, {__call = f_call})
3232

3333
return f
3434
end
@@ -47,7 +47,7 @@ function mach.mock_method(name)
4747
return m
4848
end
4949

50-
function isCallable(x)
50+
function is_callable(x)
5151
local is_function = type(x) == 'function'
5252
local has_call_metamethod = type((debug.getmetatable(x) or {}).__call) == 'function'
5353
return is_function or has_call_metamethod
@@ -58,7 +58,7 @@ function mach.mock_table(t, name)
5858
local mocked = {}
5959

6060
for k, v in pairs(t) do
61-
if isCallable(v) then
61+
if is_callable(v) then
6262
mocked[k] = mach.mock_function(name .. '.' .. tostring(k))
6363
end
6464
end
@@ -71,7 +71,7 @@ function mach.mock_object(o, name)
7171
local mocked = {}
7272

7373
for k, v in pairs(o) do
74-
if isCallable(v) then
74+
if is_callable(v) then
7575
mocked[k] = mach.mock_method(name .. ':' .. tostring(k))
7676
end
7777
end

0 commit comments

Comments
 (0)