Better stringified call

This commit is contained in:
Michael Miller 2019-12-08 15:10:49 -07:00
parent 91696d490f
commit 1a30a56f2a
2 changed files with 12 additions and 0 deletions

View file

@ -8,5 +8,12 @@ module Spectator::Mocks
def initialize(name : Symbol, @args : GenericArguments(T, NT))
super(name)
end
def to_s(io)
super
io << '('
io << @args
io << ')'
end
end
end

View file

@ -4,5 +4,10 @@ module Spectator::Mocks
def initialize(@name : Symbol)
end
def to_s(io)
io << '#'
io << @name
end
end
end