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
|
@ -5,6 +5,10 @@ module Spectator
|
||||||
|
|
||||||
@@group_stack = [::Spectator::DSL::ExampleGroupBuilder.new("ROOT")]
|
@@group_stack = [::Spectator::DSL::ExampleGroupBuilder.new("ROOT")]
|
||||||
|
|
||||||
|
private def root_group
|
||||||
|
@@group_stack.first
|
||||||
|
end
|
||||||
|
|
||||||
private def current_group
|
private def current_group
|
||||||
@@group_stack.last
|
@@group_stack.last
|
||||||
end
|
end
|
||||||
|
@ -53,9 +57,8 @@ module Spectator
|
||||||
current_group.add_around_each_hook(block)
|
current_group.add_around_each_hook(block)
|
||||||
end
|
end
|
||||||
|
|
||||||
protected def build : Array(Example)
|
protected def build : ExampleGroup
|
||||||
# TODO
|
root_group.build({} of Symbol => ValueWrapper)
|
||||||
[] of Example
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -35,9 +35,8 @@ module Spectator
|
||||||
@around_each_hooks << block
|
@around_each_hooks << block
|
||||||
end
|
end
|
||||||
|
|
||||||
def build : Array(Example)
|
def build(locals : Hash(Symbol, ValueWrapper)) : ExampleGroup
|
||||||
# TODO
|
raise NotImplementedError
|
||||||
Array(Example).new
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,9 +8,8 @@ module Spectator
|
||||||
super(what)
|
super(what)
|
||||||
end
|
end
|
||||||
|
|
||||||
def build : Array(Example)
|
def build(locals : Hash(Symbol, ValueWrapper)) : ExampleGroup
|
||||||
# TODO
|
raise NotImplementedError
|
||||||
Array(Example).new
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue