mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add examples to group children
This commit is contained in:
parent
06630e87d3
commit
2be9d65997
1 changed files with 6 additions and 3 deletions
|
@ -95,7 +95,7 @@ module Spectator
|
|||
end
|
||||
|
||||
macro it(description, &block)
|
||||
class Example%example
|
||||
class Wrapper%example
|
||||
include ::Spectator::DSL::ExampleDSL
|
||||
include {{@type.id}}
|
||||
|
||||
|
@ -104,15 +104,18 @@ module Spectator
|
|||
end
|
||||
end
|
||||
|
||||
class Wrapper%wrapper < ::Spectator::RunnableExample
|
||||
class Example%example < ::Spectator::RunnableExample
|
||||
protected def run_instance
|
||||
Example%example.new.%run
|
||||
Wrapper%example.new.%run
|
||||
end
|
||||
|
||||
def description
|
||||
{{description.is_a?(StringLiteral) ? description : description.stringify}}
|
||||
end
|
||||
end
|
||||
|
||||
%group = ::Spectator::Definitions::GROUPS[{{@type.stringify}}]
|
||||
%group.children << Example%example.new(%group)
|
||||
end
|
||||
|
||||
macro pending(description, &block)
|
||||
|
|
Loading…
Reference in a new issue