mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Move ROOT_CONTEXT out of Spectator module
This commit is contained in:
parent
6f6ba9c812
commit
c2ee9fd520
3 changed files with 4 additions and 4 deletions
|
@ -4,8 +4,6 @@ require "./spectator/*"
|
||||||
module Spectator
|
module Spectator
|
||||||
VERSION = "0.1.0"
|
VERSION = "0.1.0"
|
||||||
|
|
||||||
ROOT_CONTEXT = Context.new("ROOT")
|
|
||||||
|
|
||||||
macro describe(what, source_file = __FILE__, source_line = __LINE__, &block)
|
macro describe(what, source_file = __FILE__, source_line = __LINE__, &block)
|
||||||
module Spectator
|
module Spectator
|
||||||
module Examples
|
module Examples
|
||||||
|
@ -15,6 +13,6 @@ module Spectator
|
||||||
end
|
end
|
||||||
|
|
||||||
at_exit do
|
at_exit do
|
||||||
Runner.new(ROOT_CONTEXT).run
|
Runner.new(Context::ROOT).run
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,6 +2,8 @@ require "./example"
|
||||||
|
|
||||||
module Spectator
|
module Spectator
|
||||||
class Context
|
class Context
|
||||||
|
ROOT = Context.new("ROOT")
|
||||||
|
|
||||||
getter what : String
|
getter what : String
|
||||||
getter parent : Context?
|
getter parent : Context?
|
||||||
getter examples = [] of Example
|
getter examples = [] of Example
|
||||||
|
|
|
@ -4,7 +4,7 @@ module Spectator
|
||||||
module Examples
|
module Examples
|
||||||
include ::Spectator::DSL
|
include ::Spectator::DSL
|
||||||
|
|
||||||
CURRENT_CONTEXT = Spectator::ROOT_CONTEXT
|
CURRENT_CONTEXT = ::Spectator::Context::ROOT
|
||||||
CONTEXT_MODULE = ::Spectator::Examples
|
CONTEXT_MODULE = ::Spectator::Examples
|
||||||
GIVEN_VARIABLES = [] of Object
|
GIVEN_VARIABLES = [] of Object
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue