Fix group creation via DSL

This commit is contained in:
Michael Miller 2020-09-12 18:40:56 -06:00
parent dad669686c
commit 7c44cba667
No known key found for this signature in database
GPG key ID: FB9F12F7C646A4AD

View file

@ -1,3 +1,6 @@
require "../source"
require "./builder"
module Spectator::DSL
# DSL methods and macros for creating example groups.
# This module should be included as a mix-in.
@ -6,7 +9,7 @@ module Spectator::DSL
# The *what* argument is a name or description of the group.
# If it isn't a string literal, then it is symbolized for `ExampleNode#name`.
macro example_group(what, *, _source_file = __FILE__, _source_line = __LINE__, &block)
# Example group {{name.stringify}}
# Example group: {{what.stringify}}
# Source: {{_source_file}}:{{_source_line}}
class Group%group < {{@type.id}}
_spectator_group_subject({{what}})