Use the exact text from the describe value

This fixes described_class.new when using a generic type.
This commit is contained in:
Michael Miller 2020-04-26 11:13:07 -06:00
parent 3be9ffb7a0
commit d02b848ad5

View file

@ -23,7 +23,7 @@ module Spectator
# Ensure `described_class` and `subject` are only set for real types (is a `TypeNode`).
{% if (what.is_a?(Path) || what.is_a?(Generic)) && (described_type = what.resolve?).is_a?(TypeNode) %}
macro described_class
{{described_type.name}}
{{what}}
end
subject do