Commit Graph

8 Commits (3dafdf8f24d0ab9a5e3700ec41f0334548dc7e63)

Author SHA1 Message Date
lethosor 888c531774
Add mock.observe_func(), improve mock.lua documentation
observe_func() is similar to func() but passes through all calls to a specified
function.
2022-05-27 00:33:44 -04:00
myk002 e531346968 make a (shallow) copy of table params
this improves introspection capabilities since the table is snapshotted
at the time of the mock call
2022-02-18 13:33:08 -08:00
myk002 b7a970a309
allow mock.func() to return multiple values 2021-06-15 13:16:05 -07:00
lethosor ee8e10429d
Add initial implementation of mock.restore()
Like mock.patch() but only restores original values instead of also setting
new values initially.
2021-04-16 00:34:46 -04:00
lethosor 757736728d
Add a mock.func() helper for mocking functions 2021-04-10 01:22:03 -04:00
lethosor 5424392273
mock.patch(): propagate return values 2021-04-09 00:41:39 -04:00
lethosor f25b8a0d14
Fix patching value with nil 2021-04-09 00:35:54 -04:00
lethosor 7b2f01d45b
Add initial mock.patch() implementation for tests 2021-04-09 00:32:10 -04:00