mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Rename MAPPING to GROUPS - better name
This commit is contained in:
parent
41c0d9abc7
commit
fe81341e1a
3 changed files with 9 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
||||||
module Spectator
|
module Spectator
|
||||||
module Definitions
|
module Definitions
|
||||||
ALL = {} of Path => Object
|
ALL = {} of Path => Object
|
||||||
MAPPING = {} of String => ExampleGroup
|
GROUPS = {} of String => ExampleGroup
|
||||||
|
|
||||||
SPECIAL_CHARS = {
|
SPECIAL_CHARS = {
|
||||||
'~' => "Tilde",
|
'~' => "Tilde",
|
||||||
|
|
|
@ -12,10 +12,10 @@ module Spectator
|
||||||
module {{type.id}}%context
|
module {{type.id}}%context
|
||||||
include {{@type.id}}
|
include {{@type.id}}
|
||||||
|
|
||||||
::Spectator::Definitions::MAPPING[\{{@type.stringify}}] =
|
::Spectator::Definitions::GROUPS[\{{@type.stringify}}] =
|
||||||
ExampleGroup.new(
|
ExampleGroup.new(
|
||||||
{{what.is_a?(StringLiteral) ? what : what.stringify}},
|
{{what.is_a?(StringLiteral) ? what : what.stringify}},
|
||||||
::Spectator::Definitions::MAPPING[{{@type.stringify}}]
|
::Spectator::Definitions::GROUPS[{{@type.stringify}}]
|
||||||
)
|
)
|
||||||
|
|
||||||
_described_class {{what}}
|
_described_class {{what}}
|
||||||
|
@ -69,23 +69,23 @@ module Spectator
|
||||||
end
|
end
|
||||||
|
|
||||||
macro before_all(&block)
|
macro before_all(&block)
|
||||||
::Spectator::Definitions::MAPPING[{{@type.stringify}}].before_all_hooks << -> {{block}}
|
::Spectator::Definitions::GROUPS[{{@type.stringify}}].before_all_hooks << -> {{block}}
|
||||||
end
|
end
|
||||||
|
|
||||||
macro before_each(&block)
|
macro before_each(&block)
|
||||||
::Spectator::Definitions::MAPPING[{{@type.stringify}}].before_each_hooks << -> {{block}}
|
::Spectator::Definitions::GROUPS[{{@type.stringify}}].before_each_hooks << -> {{block}}
|
||||||
end
|
end
|
||||||
|
|
||||||
macro after_all(&block)
|
macro after_all(&block)
|
||||||
::Spectator::Definitions::MAPPING[{{@type.stringify}}].after_all_hooks << -> {{block}}
|
::Spectator::Definitions::GROUPS[{{@type.stringify}}].after_all_hooks << -> {{block}}
|
||||||
end
|
end
|
||||||
|
|
||||||
macro after_each(&block)
|
macro after_each(&block)
|
||||||
::Spectator::Definitions::MAPPING[{{@type.stringify}}].after_each_hooks << -> {{block}}
|
::Spectator::Definitions::GROUPS[{{@type.stringify}}].after_each_hooks << -> {{block}}
|
||||||
end
|
end
|
||||||
|
|
||||||
macro around_each(&block)
|
macro around_each(&block)
|
||||||
::Spectator::Definitions::MAPPING[{{@type.stringify}}].around_each_hooks << Proc(Proc(Nil), Nil).new {{block}}
|
::Spectator::Definitions::GROUPS[{{@type.stringify}}].around_each_hooks << Proc(Proc(Nil), Nil).new {{block}}
|
||||||
end
|
end
|
||||||
|
|
||||||
def include_examples
|
def include_examples
|
||||||
|
|
|
@ -11,6 +11,6 @@ module Spectator
|
||||||
given: [] of Object,
|
given: [] of Object,
|
||||||
children: [] of Object
|
children: [] of Object
|
||||||
} %}
|
} %}
|
||||||
::Spectator::Definitions::MAPPING[{{@type.stringify}}] = ::Spectator::ExampleGroup::ROOT
|
::Spectator::Definitions::GROUPS[{{@type.stringify}}] = ::Spectator::ExampleGroup::ROOT
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue