mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Example group builder classes should build groups
It's implied in their name.
This commit is contained in:
parent
d551cf6e1b
commit
037fe604ea
3 changed files with 10 additions and 9 deletions
src/spectator/dsl
|
@ -5,6 +5,10 @@ module Spectator
|
|||
|
||||
@@group_stack = [::Spectator::DSL::ExampleGroupBuilder.new("ROOT")]
|
||||
|
||||
private def root_group
|
||||
@@group_stack.first
|
||||
end
|
||||
|
||||
private def current_group
|
||||
@@group_stack.last
|
||||
end
|
||||
|
@ -53,9 +57,8 @@ module Spectator
|
|||
current_group.add_around_each_hook(block)
|
||||
end
|
||||
|
||||
protected def build : Array(Example)
|
||||
# TODO
|
||||
[] of Example
|
||||
protected def build : ExampleGroup
|
||||
root_group.build({} of Symbol => ValueWrapper)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -35,9 +35,8 @@ module Spectator
|
|||
@around_each_hooks << block
|
||||
end
|
||||
|
||||
def build : Array(Example)
|
||||
# TODO
|
||||
Array(Example).new
|
||||
def build(locals : Hash(Symbol, ValueWrapper)) : ExampleGroup
|
||||
raise NotImplementedError
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,9 +8,8 @@ module Spectator
|
|||
super(what)
|
||||
end
|
||||
|
||||
def build : Array(Example)
|
||||
# TODO
|
||||
Array(Example).new
|
||||
def build(locals : Hash(Symbol, ValueWrapper)) : ExampleGroup
|
||||
raise NotImplementedError
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue