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 Definitions
|
||||
ALL = {} of Path => Object
|
||||
MAPPING = {} of String => ExampleGroup
|
||||
GROUPS = {} of String => ExampleGroup
|
||||
|
||||
SPECIAL_CHARS = {
|
||||
'~' => "Tilde",
|
||||
|
|
|
@ -12,10 +12,10 @@ module Spectator
|
|||
module {{type.id}}%context
|
||||
include {{@type.id}}
|
||||
|
||||
::Spectator::Definitions::MAPPING[\{{@type.stringify}}] =
|
||||
::Spectator::Definitions::GROUPS[\{{@type.stringify}}] =
|
||||
ExampleGroup.new(
|
||||
{{what.is_a?(StringLiteral) ? what : what.stringify}},
|
||||
::Spectator::Definitions::MAPPING[{{@type.stringify}}]
|
||||
::Spectator::Definitions::GROUPS[{{@type.stringify}}]
|
||||
)
|
||||
|
||||
_described_class {{what}}
|
||||
|
@ -69,23 +69,23 @@ module Spectator
|
|||
end
|
||||
|
||||
macro before_all(&block)
|
||||
::Spectator::Definitions::MAPPING[{{@type.stringify}}].before_all_hooks << -> {{block}}
|
||||
::Spectator::Definitions::GROUPS[{{@type.stringify}}].before_all_hooks << -> {{block}}
|
||||
end
|
||||
|
||||
macro before_each(&block)
|
||||
::Spectator::Definitions::MAPPING[{{@type.stringify}}].before_each_hooks << -> {{block}}
|
||||
::Spectator::Definitions::GROUPS[{{@type.stringify}}].before_each_hooks << -> {{block}}
|
||||
end
|
||||
|
||||
macro after_all(&block)
|
||||
::Spectator::Definitions::MAPPING[{{@type.stringify}}].after_all_hooks << -> {{block}}
|
||||
::Spectator::Definitions::GROUPS[{{@type.stringify}}].after_all_hooks << -> {{block}}
|
||||
end
|
||||
|
||||
macro after_each(&block)
|
||||
::Spectator::Definitions::MAPPING[{{@type.stringify}}].after_each_hooks << -> {{block}}
|
||||
::Spectator::Definitions::GROUPS[{{@type.stringify}}].after_each_hooks << -> {{block}}
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
def include_examples
|
||||
|
|
|
@ -11,6 +11,6 @@ module Spectator
|
|||
given: [] of Object,
|
||||
children: [] of Object
|
||||
} %}
|
||||
::Spectator::Definitions::MAPPING[{{@type.stringify}}] = ::Spectator::ExampleGroup::ROOT
|
||||
::Spectator::Definitions::GROUPS[{{@type.stringify}}] = ::Spectator::ExampleGroup::ROOT
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue