mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Must use class variables
This commit is contained in:
parent
ab7087649d
commit
fc1c0351cd
1 changed files with 4 additions and 4 deletions
|
@ -3,15 +3,15 @@ module Spectator
|
||||||
module Builder
|
module Builder
|
||||||
extend self
|
extend self
|
||||||
|
|
||||||
@group_stack = [::Spectator::DSL::ExampleGroupBuilder.new("ROOT")]
|
@@group_stack = [::Spectator::DSL::ExampleGroupBuilder.new("ROOT")]
|
||||||
|
|
||||||
private def current_group
|
private def current_group
|
||||||
@group_stack.last
|
@@group_stack.last
|
||||||
end
|
end
|
||||||
|
|
||||||
private def push_group(group : ExampleGroupBuilder)
|
private def push_group(group : ExampleGroupBuilder)
|
||||||
current_group.add_child(group)
|
current_group.add_child(group)
|
||||||
@group_stack.push(group)
|
@@group_stack.push(group)
|
||||||
end
|
end
|
||||||
|
|
||||||
def start_group(what : String) : Nil
|
def start_group(what : String) : Nil
|
||||||
|
@ -25,7 +25,7 @@ module Spectator
|
||||||
end
|
end
|
||||||
|
|
||||||
def end_group : Nil
|
def end_group : Nil
|
||||||
@group_stack.pop
|
@@group_stack.pop
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_example(example_type : Example.class) : Nil
|
def add_example(example_type : Example.class) : Nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue