diff --git a/src/spectator/mocks/generic_method_call.cr b/src/spectator/mocks/generic_method_call.cr index 628e40f..64f8999 100644 --- a/src/spectator/mocks/generic_method_call.cr +++ b/src/spectator/mocks/generic_method_call.cr @@ -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 diff --git a/src/spectator/mocks/method_call.cr b/src/spectator/mocks/method_call.cr index 7c85862..00c6d0c 100644 --- a/src/spectator/mocks/method_call.cr +++ b/src/spectator/mocks/method_call.cr @@ -4,5 +4,10 @@ module Spectator::Mocks def initialize(@name : Symbol) end + + def to_s(io) + io << '#' + io << @name + end end end