mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Include stub source in to_s
This commit is contained in:
parent
59884f253f
commit
b107511c9e
4 changed files with 7 additions and 3 deletions
|
@ -20,6 +20,10 @@ module Spectator::Mocks
|
|||
io << @args
|
||||
io << ')'
|
||||
end
|
||||
io << " : "
|
||||
io << ReturnType
|
||||
io << " at "
|
||||
io << @source
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ module Spectator::Mocks
|
|||
if (cast = nil.as?(RT))
|
||||
cast
|
||||
else
|
||||
raise "The return type of stub #{to_s} : Nil doesn't match the expected type #{RT}"
|
||||
raise "The return type of stub #{self} doesn't match the expected type #{RT}"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ module Spectator::Mocks
|
|||
if (cast = result.as?(RT))
|
||||
cast
|
||||
else
|
||||
raise "The return type of stub #{to_s} : #{ReturnType} doesn't match the expected type #{RT}"
|
||||
raise "The return type of stub #{self} doesn't match the expected type #{RT}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@ module Spectator::Mocks
|
|||
if (cast = result.as?(RT))
|
||||
cast
|
||||
else
|
||||
raise "The return type of stub #{to_s} : #{ReturnType} doesn't match the expected type #{RT}"
|
||||
raise "The return type of stub #{self} doesn't match the expected type #{RT}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue