mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Basic to_s for stubs
This commit is contained in:
parent
d1b54ad48f
commit
9294599440
2 changed files with 14 additions and 0 deletions
|
@ -14,5 +14,14 @@ module Spectator::Mocks
|
||||||
end
|
end
|
||||||
|
|
||||||
abstract def call(args : GenericArguments(T, NT)) : ReturnType forall T, NT
|
abstract def call(args : GenericArguments(T, NT)) : ReturnType forall T, NT
|
||||||
|
|
||||||
|
def to_s(io)
|
||||||
|
super(io)
|
||||||
|
if @args
|
||||||
|
io << '('
|
||||||
|
io << @args
|
||||||
|
io << ')'
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,5 +9,10 @@ module Spectator::Mocks
|
||||||
def callable?(call : GenericMethodCall(T, NT)) : Bool forall T, NT
|
def callable?(call : GenericMethodCall(T, NT)) : Bool forall T, NT
|
||||||
@name == call.name
|
@name == call.name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def to_s(io)
|
||||||
|
io << '#'
|
||||||
|
io << @name
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue