mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Fix finding stubs on types (static methods)
This commit is contained in:
parent
23fd075d51
commit
d9bb8e33fe
1 changed files with 4 additions and 0 deletions
|
@ -52,6 +52,10 @@ module Spectator::Mocks
|
|||
fetch_type(object.class).stubs.find(&.callable?(call))
|
||||
end
|
||||
|
||||
def find_stub(type : T.class, call : MethodCall) forall T
|
||||
fetch_type(type).stubs.find(&.callable?(call))
|
||||
end
|
||||
|
||||
def record_call(object, call : MethodCall) : Nil
|
||||
fetch_instance(object).calls << call
|
||||
fetch_type(object.class).calls << call
|
||||
|
|
Loading…
Reference in a new issue