mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Allow subject for non-class types
This commit is contained in:
parent
88ed415191
commit
71740113d5
1 changed files with 5 additions and 1 deletions
|
@ -19,7 +19,7 @@ module Spectator
|
||||||
%source = ::Spectator::Source.new({{_source_file}}, {{_source_line}})
|
%source = ::Spectator::Source.new({{_source_file}}, {{_source_line}})
|
||||||
::Spectator::SpecBuilder.start_group({{description}}, %source)
|
::Spectator::SpecBuilder.start_group({{description}}, %source)
|
||||||
|
|
||||||
{% if what.is_a?(Path) || what.is_a?(Generic) %}
|
{% if (what.is_a?(Path) || what.is_a?(Generic)) && what.resolve? %}
|
||||||
macro described_class
|
macro described_class
|
||||||
{{what}}
|
{{what}}
|
||||||
end
|
end
|
||||||
|
@ -27,6 +27,10 @@ module Spectator
|
||||||
def subject(*args)
|
def subject(*args)
|
||||||
described_class.new(*args)
|
described_class.new(*args)
|
||||||
end
|
end
|
||||||
|
{% else %}
|
||||||
|
def subject
|
||||||
|
{{what}}
|
||||||
|
end
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
{{block.body}}
|
{{block.body}}
|
||||||
|
|
Loading…
Reference in a new issue