Inspecting the value's class seems to work now

This commit is contained in:
Michael Miller 2022-03-22 22:13:02 -06:00
parent d6fcf128ba
commit 7dd2cffa8e
No known key found for this signature in database
GPG key ID: AC78B32D30CE34A2

View file

@ -290,9 +290,7 @@ module Spectator
nil nil
{% else %} {% else %}
# The stubbed value was something else entirely and cannot be cast to the return type. # The stubbed value was something else entirely and cannot be cast to the return type.
# `<Unknown>` should be replaced with the real type of %value (`%value.class`). raise TypeCastError.new("#{_spectator_stubbed_name} received message #{ {{call}} } and is attempting to return a `#{%value.class}`, but returned type must be `#{ {{type}} }`.")
# However, there's some weird bug that causes a segfault when trying to inspect the value.
raise TypeCastError.new("#{_spectator_stubbed_name} received message #{ {{call}} } and is attempting to return a <Unknown>, but returned type must be `{{type}}`.")
{% end %} {% end %}
end end
end end